Disable a set of packages, is it possible?

281 views
Skip to first unread message

Pablo Giménez

unread,
Sep 1, 2020, 10:52:04 AM9/1/20
to rez-config

Hello.
Is there any way to disable a set of packages?
Let say I have a package folder, it contains simple packages that just add some envvars with information about a particular shot, so I have something like:
/studio/packages/shots
shot1
 package.py
shot2
 package.py
shot3
 package.py

Ideally I would like to have an attribut in the package description in package.py that enable/disable it, this way if a shot is put on hold I can disable it temporaly.
Another way will be to have a file with the list of packages to be disabled and point to it from a property in rezconfig.py .
Does this functionality exists?

Ah! I forgot, I dont want to remove  the package itself ;) Just leave it in the package repository but disable it when rez env solves a context.

Thanks

P

Jean-Christophe Morin

unread,
Sep 1, 2020, 10:58:58 AM9/1/20
to rez-c...@googlegroups.com
Hey Pablo, you can use a ".ignore<version>" that will make rez ignore the package, see https://github.com/nerdvegas/rez/blob/master/src/rezplugins/package_repository/filesystem.py. WOuld be nice to have this one documented somewhere eventually.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/ecdbc277-9412-40ef-ada0-e376f7f53892n%40googlegroups.com.


--
RODEO FX  
Facebook Twitter LinkedIn Vimeo Instagram
Jean-Christophe Morin 
Software developer

jcm...@rodeofx.com 
514.397.9999 ext.323  
www.rodeofx.com

Pablo Giménez

unread,
Sep 1, 2020, 11:10:15 AM9/1/20
to rez-config
Ah! this is cool Jean.
I will give this a go, thanks !!

P

Allan Johns

unread,
Sep 1, 2020, 8:20:58 PM9/1/20
to rez-c...@googlegroups.com
Good point JC, this just came up recently actually. Made a ticket: https://github.com/nerdvegas/rez/issues/946

Thx
A


Allan Johns

unread,
Sep 1, 2020, 8:29:04 PM9/1/20
to rez-c...@googlegroups.com
To add to this -

Bear in mind there is a subtle problem that ignoring/unignoring packages will cause. Rez timestamping doesn't work in conjunction with these .ignore files. For example, if I created a '.ignore1.2.3' file for package foo, at time A, then deleted it later at time B, then rez will not know that the ignore file was ever there. If I then `rez-env -t X foo-1.2.3`, there X is between A and B, then I will get foo-1.2.3, even though it was actually being ignored at the time.

This is an example imho of why using a package manager to organise shot configuration data isn't necessarily a good idea. At Method we have an entirely different system for doing that, which manages a hierarchy of configs, in combination with their change history. That system is capable of giving you a config (and its appropriate overrides) as it existed at any time, regardless of when contributring configs may have been created or deleted. We actually use this system to drive env management as well - we store "profiles" (which define the package requests for runtime envs) into these configs, then use rez to create the configured env.

Hth
A


Pablo Giménez

unread,
Sep 2, 2020, 6:32:41 PM9/2/20
to rez-config
And if we add support for timestamps for ignore files?
The ignore file can just contain a timestamp, or we can check creation/modification time of the file as timestamp.
I know is not perfect, but probably the benefit of consolidating all env setup into rez rather than having another  layer to solve shots probably trumps over some corner cases where race condition can cause issues.

Allan Johns

unread,
Sep 2, 2020, 6:48:09 PM9/2/20
to rez-c...@googlegroups.com
Adding timestamp support for ignore files isn't trivial - you would need to store timestamps for the entire history of changes to a given ignore file, and interpret that correctly during resolves. This is moving in a direction that rez is not designed for - it's a package manager, not an environment manager. Packages are supposed to be immutable.

In my experience having one system that is responsible both for configuring resolved runtimes and managing job/shot/etc environments doesn't scale well and just doesn't work well - they are different problems with different solutions.

A



Pablo Giménez

unread,
Sep 2, 2020, 7:34:07 PM9/2/20
to rez-config
Mmmm ok, good to know Allan, thanks fir the suggestion!
Reply all
Reply to author
Forward
0 new messages