Hi all,
Just getting started with integrating Rez and was wondering what your thoughts and experiences were with regards to having projects as regular old Rez packages.
At my current studio, we’ve got a system much like Rez and it’s being used in this way with one exception; projects have what you might call sub-packages. That is, for a project called Avengers and an application called Maya, there is an embedded maya
, maya:render
and maya:py
(and more), each of which having its own dependencies and environments. It’s quite likely these could just as well have been separate packages, I’m just about to look into this now, and if so, then it’d make sense to continue the tradition into Rez as well.
I’m expecting a few bumps in the road along the way, and that’s my question to you. Has anyone done this, or are doing this? What should I expect?
Best,
Marcus
Cool, thanks for that.
As to project we used this since (naively) we did manage requests with rez packages. I would not recommend this route since rez does not have a concept of overrides and you end up with a lot of micromanagement.
Can you elaborate on this, what does overrides mean in this context? E.g. projectA
has one set of environment variables that projectA_animation
overrides? Is there an explicit order to packages Rez resolves, or do they come randomly? If there’s an order, would overrides not work?
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
Cool, thanks for that.
As to project we used this since (naively) we did manage requests with rez packages. I would not recommend this route since rez does not have a concept of overrides and you end up with a lot of micromanagement.
Can you elaborate on this, what does overrides mean in this context? E.g.
projectA
has one set of environment variables thatprojectA_animation
overrides? Is there an explicit order to packages Rez resolves, or do they come randomly? If there’s an order, would overrides not work?
On Wed, 17 Apr 2019 at 16:17, Blazej Floch <blaze...@gmail.com> wrote:
--We had 'project' and 'studio' (location) as rez packages.This allowed us to create some interesting variants like having a 'license' package manage different license severs depending on studio.As to project we used this since (naively) we did manage requests with rez packages. I would not recommend this route since rez does not have a concept of overrides and you end up with a lot of micromanagement.But even along the lines of inhouse tooling that relied on some kind of project variable, we moved that variable to the project package. This way we can guarantee it's existence since rez took care of it.Just be careful to check that there is an explicit version in the request, else you get an arbitrary project if not specified.On Wednesday, 17 April 2019 02:31:25 UTC-4, Marcus Ottosson wrote:Hi all,
Just getting started with integrating Rez and was wondering what your thoughts and experiences were with regards to having projects as regular old Rez packages.
At my current studio, we’ve got a system much like Rez and it’s being used in this way with one exception; projects have what you might call sub-packages. That is, for a project called Avengers and an application called Maya, there is an embedded
maya
,maya:render
andmaya:py
(and more), each of which having its own dependencies and environments. It’s quite likely these could just as well have been separate packages, I’m just about to look into this now, and if so, then it’d make sense to continue the tradition into Rez as well.I’m expecting a few bumps in the road along the way, and that’s my question to you. Has anyone done this, or are doing this? What should I expect?
Best,
Marcus
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-c...@googlegroups.com.
Thanks Blazej!
A system that manages the requests representing a toolset
This makes sense, and now I see what you meant by..
you can not have a overrides for requests within rez
However, I would have thought that having a broad requirement - such as maya>=2015,<2019
- from e.g. a facility-level package could get “specialised” by a show package, e.g. maya>=2017,<2019
and then further specialised by an asset, e.g. maya==2018
$ rez env alita alita_1500
Would that qualify as overrides? Or what would an override do differently?
A system that manages the timestamp in order to freeze states of environments
This goes over my head at the moment; do you mean that you’d only resolve an environment anew if an existing one was old enough? How old is old, 1 minute, 1 hour, 1 week? Is it for performance reasons, or something functional? Spontaneously, it sounds like an artist could end up with an old environment, even though the developer swears by it.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
Hi all,
Here’s something I’m struggling with in attempting this.
facility
package, with variables like GITLAB_URL=https://gitlab.here.com
alita
package for a project, with requirements like facility
and core_pipeline>=1.0.2
, great maya2018
package, with variables e.g. MAYA_ENABLE_LEGACY_VIEWPORT=1
, greatBut now I’ve got special requirements for Maya, if used with alita
.
alita_maya2018
package, with maya2018
as a requirement, along with project-specific ones and an environmentThis kind of works, I think, except it’s quite verbose. I’d end up with lots of duplicate maya2018
packages for each project.
What do you think?
Best,
Marcus
Thanks Dani!
First I think you should have a maya package, with 2016/2017/2018 versions, not a maya2018 package.
Agreed, wanted to keep things simple for this example.
Then you could make one alita package, with different variants for different maya versions.
Great, will look into that.
Ok, I’ll revert to alita_maya2018
, but mostly because I can’t actually figure out how to actually use variants. :/ They looked promising though!
This one doesn’t have an actual example, but says it triggers a build multiple times, but my project package has build_command = None
as it doesn’t need building.
Anyone have a reproducible example I could see, i.e. a package.py
and (if necessary) a rezbuild.py
?
Hey Allan,
if you had some “maya” rez package, and an “alita_maya” package (requiring “maya”), and they both required some “anim_tool” package, then you’d immediately run into trouble if you wanted alita to use a different version of anim_tool than the default specified in “maya” - this would produce a resolve conflict.
I must admit I’m not fully appreciating the problem just yet. Here’s how I would approach this example.
package.py |
Requires | |
---|---|---|
A | anim_tool/package.py | |
B | vanilla_maya/package.py | requires = ["anim_tool>0.5,<3.0"] |
C | vfx_maya/package.py | requires = ["anim_tool>2.2,<2.7"] |
D | alita_maya/package.py | requires = ["anim_tool>2.6,<2.6.3"] |
B | alita_vector_maya/package.py | requires = ["anim_tool==2.3.6"] |
Likewise, with overly and underly permissive requirements:
package.py |
Requires | |
---|---|---|
anim_tool/package.py | ||
vanilla_maya/package.py | requires = ["anim_tool>0.5,<3.0"] |
|
x | vfx_maya/package.py | requires = ["anim_tool>2.0,<3.5"] |
y | alita_maya/package.py | requires = ["anim_tool>0.1,<2.5"] |
z | alita_vector/package.py | requires = ["anim_tool==2.3"] |
I expect there’s something I’m not yet seeing, but this is what I’m investigating at the moment.
If you ran “rez-env A B”, you would get (A-2, B-1) - because A was requested first
This goes over my head at the moment, but sounds like it might throw a wrench in the theory above; will investigate!
It’s interesting that newcomers to rez often think about using it in terms of defining a production runtime env, rather than a package’s.
Defining packages was quite straightforward I thought, so that might be one reason it doesn’t come up as often in questions and conversation. Projects and assets on the other hand doesn’t seem as common, and from my point of view - having written several launchers like the ones you describe in the past - having one less system to juggle is an appealing proposition; especially when the two systems solve almost identical problems.
For any given request, the resolve (the list of resulting packages, and the order in which their commands are sourced) is always deterministic
This has been my experience so far, which is really great!
Thanks Jean-Christophe!
At least it’s what we (RodeoFX) quickly noticed/discovered when we started to use Rez.
Would it be possible to go into more detail on what prompted you to leave Rez, and build another system instead?
One of the key motivations for me personally wanting to use Rez is because I’ve built the kind of system you mention, many times. And the reason for building it over and over is precisely why I’m looking into Rez to solve (pun!) this once and for all; because (a) it’s a hard problem and (b) the result is often proprietary or too specific; and yet they all solve the same problem. At Rodeo. At Method. You name it. One of the benefits of using Rez isn’t just that it solves a particular problem, but because there exists a community around it, and extra pairs of hands to help advance and enhance it. Just imagine being able to come to a community to ask for help about not just resolving software environments, but projects (and assets!) too. Think of the incentive for developers - in-house and open source alike - to build and enhance available tooling around such a system, both technically and graphically. And the kind of adoption such a think could have. With that kind of community, one could fathom make a good living off of building tools around Rez that enhance the lives of others.
I put together a small example of how one might use projects and software with Rez; in this repo, I’d like to try and capture the requirements of my current client, but also identify exactly the kind of problems lie with in, and whether (a) it’s a lost cause, (b) there’s a way or (c) Rez can be made to support it.
There are a few things missing from this already, which I’ve added to the bottom of the README. As of this writing, I’m looking into:
alita
, not lotr
.rez build
to explicitly allow overwriting.rezutils
package to be built.Let me know your thoughts.
Best,
Marcus
There are a few things missing from this already, which I’ve added to the bottom of the README. As of this writing, I’m looking into:
- Relative Requirements I’d like to associate Pyblish with Maya, but only when run alongside
alita
, notlotr
.
- Overwriting Installs Every install overwrites a prior install, that’s bad. I’d like for an argument to be passed to
rez build
to explicitly allow overwriting.
- Rezutils Requirement I’d like for standalone packages, like Pyblish, to not depend on an internal
rezutils
package to be built.
You can achieve that (conditional requirements) with late bindings functions
Yes, that’s it!
@late()
def requires():
global in_context
requires = this.build_requirements[:]
if in_context() and "maya" in request:
requires += this.maya_requirements
if in_context() and "nuke" in request:
requires += this.nuke_requirements
return requires
However I did find this note in the wiki a little disconcerting;
if this function … [then] no code evaluation has to happen at runtime then, so it’s cheaper
How and when could @late
impact the system? Is there any way I can stress-test the overhead, to get a sense of whether the cost outweighs the gain? Spontaneously, I would have thought the cost of calling a Python function - even hundreds to thousands of times - would fade in comparison to the amount of IO happening elsewhere.
$ python test.py
Open/read file: 273.5/sec # NFS mounted drive, on Windows 10
Calling function: 1,280,023.4/sec
I think you are mixing here build and install (rez release)
That is true, I never got to actually release
anything yet, which would have solved this problem. Thanks.
you should not add
rezutils
to your requirements, but to your private_build_requires
Genius, this is great; although, the OCD isn’t too keen on mixing an internal package, like rezutils
in with an otherwise vanilla external package, like pip
. It would make this otherwise generic package into something specific to my system. Though I can’t think of another way, since I wouldn’t want pip
to duplicate the rather involved build script.
I’ve updated the repo with these additions; the next missing bit is overrides. That is, if /projects/alita/rez
is on the REZ_PACKAGE_PATH
, then the contained maya/package.py
should override the studio-wide Maya configuration for this project.
Is there any way of achieving this at the moment? Be it hacky or otherwise. :)
--
Thanks Allan, you raise many of good points; some of which clearly fall outside the scope of Rez. Others I can see handled with Rez, albeit in a round-about-way. And some I might not necessarily want a specific feature for.
requires
We already had a config system
This is likely true for a lot of situations, but does it not require maintenance? I’d imagine that being more expensive than building one.
Typically, this override is not a narrowing of the version range specified at the facility level
This was a little surprising, I would have thought the facility
would encapsulate all available versions of e.g. Maya, in which case any config using facility
would have to be a narrowing.
requires = [
"~maya>2015,<=2020.pr102"
]
Why would facility
specify anything other than the latest available at a facility?
read facility-level profiles up until date X
This does sound like a solution to the problem you specify, but I wonder whether it isn’t too “magic”? Or at least overly convenient. That is, once locked at a particular date, how do you go about debugging an unexpected/erroneous package becoming part of your profile? Sounds like you would almost need an additional tool(chain) to visualise (and edit?) a profile at a given time; like a change timeline, or Git history.
If we didn’t have this, we’d be forced to copy the entire profile from facility down into show, in an attempt to lock everything down.
From the outside, it does read like this is both more explicit and a reasonable compromise. A locked facility is a locked facility, having a (static) copy of it reside alongside a project seems fair, and more importantly debuggable.
Even this wouldn’t work however, since a new package could be added to facility level too.
Wouldn’t it though? Once copied and added to the Rez packages path, wouldn’t it be picked up instead of the global facility
package, in which case any changes to the original would go unnoticed? Locked is locked.
$ export REZ_PACKAGES_PATH=/packages # global `facility`
$ export REZ_PACKAGES_PATH=/projects/alita/rez # containing /facility/package.py
$ rez env ...
ignore all packages released after date X
Not having experienced the problem first-hand, I couldn’t say whether this is a good or bad solution to it. But it still does sound magical. What kind of problems have you experienced with this kind of “time-based requires”, and has it ever inspired a separate/better solution that you are unable to implement for whatever reason, e.g. (1) it’s good enough or (2) we’ve got too much riding on it already?
In practice, due to these red flags, I likely wouldn’t implement this in a pipeline solely based on the experience of others. I would need to experience the problems first-hand, despite..
Overspecification creates a big maintenance burden, and a bottleneck
..because on the other side of the coin, overengineering and creates a maintenance burden too. (Not to imply the system at Method is overengineered, as it sounds to have been built to address an existing problem, but rather that it would have been to use it for a studio not having experienced the problem)
lock off packages to say, 6am every Tuesday and Thursday
Though I will admit, there is something about this though that puts the artist in me at ease; having been through too many “but it worked yesterday!?” situations myself. :)
If we want both maya instances to be visible in an artist’s console, then we need a way to differentiate.
Do you mean instead of opening up a second console session?
Terminal 1
$ rez env alita maya_fx
$ # maya available, with an fx "profile"
Terminal 2
$ rez env alita maya_anim
$ # maya available, with an anim "profile"
I would have though that to be more clear and expected, than mixing what is effectively two independent environments. Maybe I’m not reading that right.
we can override profile definitions per: show, sequence …
This is what I’m looking into for Rez at the moment, will put something together about this in the coming days, but in short I’ve found a few ways to go about it using plain packages that I’ve found either good-enough or to require a feature addition to Rez itself.
One idea builds on this: https://github.com/nerdvegas/rez/issues/21#issuecomment-484924799
Imo, specifying what packages you want for a specific situation is a configuration issue; Determining what packages you need in order to satisfy such as request, and configuring the resulting env in a way that satisfies this resolved package list, is a rez issue.
You may be right, but at this point in time - despite the unique additions of your configuration system - I honestly can’t tell the difference. If you turned that sentence around, I wouldn’t have batted an eye.
Imo, specifying what packages you want for a specific situation is a rez issue; Determining what packages you need in order to satisfy such as request, and configuring the resulting env in a way that satisfies this resolved package list, is a configuration issue.
Now, having said all of the above - if the requirements of your studio don’t include the kind of more advanced features that I’ve outlined above, and if you don’t have an existing config system to drive the sort of thing that I’ve described, then it could very well make sense to use rez to solve this problem instead.
I’ve got a few handful of requirements left to implement, but indeed it’s looking like we would at the very least be able to start off using just Rez, and in time build another system on-top as problems arise better suited for a separate system.
the config system that we have was in and of itself quite a lot of work
It does sound quite involved.
For time-based requirements, I’d imagine something along the lines of:
name = "alita"
requires = [
"facility-3:<2019-4-23", # Locked to a specific max-date
"core_pipeline-1:==tuesday,thursday" # Picked up from only these days of the week
]
Although I wonder whether this isn’t an argument against semver, and for calendar versioning. https://news.ycombinator.com/item?id=19658969. Especially considering we (in VFX) rarely (ever?) follow the “major release when introducing breaking changes” anyway and are more likely to follow a “2 weeks == ancient history” mentality. :)
For overrides I’d imagine:
/shows/alita/rez/maya/package.py
name = "maya"
version = "1.0"
override = True
requires = [
"fur_tools==1.6.3",
]
/packages/maya/package.py
name = "maya"
version = "2018.5.1"
requires = [
# lots of requirements,
]
Where the “override” is discovered first, and added to whatever was found next.
Thanks for sharing Alexandra!
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-c...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-c...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
...--
Thanks Fede, this is invaluable information!
rez env maya-2018 alita-1.2+<2 foo-2 bar-3 blah-1.4 —timestamp 1555933692
That’s really neat. I think at this point, given the predominance of the two-systems approach to project configuration, the main gap in my understanding is this:
If I didn’t know any better, I’d think you had a configuration file of sorts, with a name = "my_preset"
and requires = ["alita", "maya"]
variable along with timestamp = 1555933692
. Something you developed locally whilst testing, versioned independently and released without the risk of conflict. I’d think that you developed and maintained such a configuration file similarly to how you develop a Rez package. Maybe you even called on Rez to bring everything together and spit that string out.
$ rez env second_system-1.0 -- second_system -c "alita animation"
rez env maya-2018 alita-1.2+<2 foo-2 bar-3 blah-1.4 --timestamp 1555933692
What does your configuration file look like, and how do you develop it? Specifically, how does it differ from a Rez package?
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "rez-config" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rez-config/ni5CK2pxj38/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
Would it be possible to go into more detail on what prompted you to leave Rez, and build another system instead?
Thanks for sharing Alexandra!
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-c...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-c...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
--Jean-Christophe Morin
Software developer
Office: 418 523-9996
_____________________
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
So we built a configuration system using Shotgun
Thanks JC, this was a real Aha-moment and makes a lot of sense! Using Shotgun - or any GUI for that matter - for project configuration means you’re able to manage high-level requirements for high-level aspects of a show, like the show itself and assets, without resorting to command-line and Git. Especially when the crew is already familiar and involved with the system, like they would be for Shotgun/ftrack.
It is a java GUI with a database that stores key-value pairs of settings
Thanks for sharing Fede, the advantages to this sound similar to what JC mentioned about using a production tracker which makes sense.
These were my takeaway from your setup (primarily meant for future readers, including myself).
Just wanted to add, the contributions to this thread so far has been amazing, thanks to everyone!
I’d be curious to know why you don’t want o have a dependency to build you packages?
Sorry, forgot to answer this one!
After some thought and some more experience going this route, I think you’re right; it hasn’t been an issue so far and is actually quite intuitive.
Thanks JC, this was a real Aha-moment and makes a lot of sense! Using Shotgun - or any GUI for that matter - for project configuration means you’re able to manage high-level requirements for high-level aspects of a show, like the show itself and assets, without resorting to command-line and Git.
So we built a configuration system using Shotgun
Thanks JC, this was a real Aha-moment and makes a lot of sense! Using Shotgun - or any GUI for that matter - for project configuration means you’re able to manage high-level requirements for high-level aspects of a show, like the show itself and assets, without resorting to command-line and Git. Especially when the crew is already familiar and involved with the system, like they would be for Shotgun/ftrack.
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.
Ah, gotcha.At least then you'll benefit from having a single "definition" of a project and asset in Shotgun, rather having one as a separate Rez package on disk, or additional database. Other than that though, not sure I see much benefit to leveraging Shotgun for ensuring package uniqueness; aren't you already getting that guarantee from git tags?
--
You received this message because you are subscribed to the Google Groups "rez-config" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
To post to this group, send email to rez-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/rez-config.
For more options, visit https://groups.google.com/d/optout.