rez-build - prioritise local packages mode?

331 views
Skip to first unread message

eoin....@gmail.com

unread,
Dec 20, 2016, 6:13:47 AM12/20/16
to rez-config

Hi Allan,

wrestling with a few wrinkles in our automated testing and local package building, both using rez-build, and wondering what your feeling is about a "favour local packages" mode in rez-build.


What this would do is force rez to use any packages built in your local packages path, and only use the global packages path where there is nothing local - not sure if it's even possible, I don't know that much about how Rez's version resolution algorithm works.


Example:

I do a rez-build of BaseLib-1.0.0 from my dev branch "X"

I do a rez-build of ClientLib-1.00 (also from a dev branch "X") which depends on BaseLib-1<1.1. 


Our automated test system relies on finding the same branch for multiple packages, so if I tell it to use branch "X" it will use it for ClientLib, and try and find the same branch for all of it's dependencies.


At some point, someone releases a BaseLib-1.0.1, and now any local rez-builds, and automated tests, pick up this new version of BaseLib... which does not contain the changes I've made.


At the moment, what rez-build does can change from one moment to the next, and it seems like it would be good to have a way of preventing this - locking down by timestamp or some other method would also be acceptable, just proposing the "favour local packages" as an option


Thanks, have a good Christmas

Eoin

Allan Johns

unread,
Jan 5, 2017, 5:50:56 PM1/5/17
to rez-c...@googlegroups.com
Hey Eoin,

Happy new year!

I can see the need for what you're describing, and I'm sure this has come up before actually. Rez has a new(ish) feature related to this, it's called package ordering. You can implement your own "package orderers", which alter the default consumption order (highest package version first). In theory this could be used to implement what you describe.

This local-first ordering though seems general enough that it may warrant its own handling (and I suspect I can do it more optimally also). It may also be worth adding a config setting to set the default behavior, as some may want this to be the default.

Furthermore, handling it specifically means I could merge this ordering behavior with any other applied filters, which could be useful. Normally you cannot apply more than one package orderer to a list of package versions - I haven't allowed this because the end result would be often confusing, and often one orderer would completely override the previous orderer anyway. But I can see the value in supporting local-first ordering, in combination with other custom orderers.

A




--
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+unsubscribe@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.

Alexis Oblet

unread,
Jul 17, 2021, 8:26:23 AM7/17/21
to rez-config
Hi guys,

Resurecting an old one.

TL;DR
Is there a way to gain confort while creating testing environments - with specifc local ones ? :)

Rez build
Finally how did you manage it ? Did you write a custom PackageOrder or through another generic way ?

Rez env / testing local
I'm seeing the same issue as Evoin is describing with rez build.
It would be nice to force specific local packages while using rez env.
Something like: rez env "local/BaseLib" anotherPackage .
Then we could:
  1. Preventing rez env picking new released packages (greater than local ones) 
  2. Mixing an environment with local versions for desired packages and production ones.
Rez env / testing local - manual version
We could do it by forcing the version we have in local, but it seems not to be the simplest workflow while testing.
Since it assumes we should always manually set this patch version when creating a test environment.

Rez env / use case
The reason why I'm trying to find the easiest way is to setup a development envrionment via an IDE like PyCharm (with a constant mecanism).
Python packages would be symlinked with rez_install_dirs LOCAL_SYMLINK as described by Allan here.
I'd like to automate the rez env triggered in the IDE running script with local packages for specific ones.

Or maybe is there already another way to achieve this behavior ?
Are you specifying strictly your local version each time your testing ? Like rez env BaseLib==1.0.0

Thanks for your feedback.

To unsubscribe from this group and stop receiving emails from it, send an email to rez-config+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages