package caching not working

215 views
Skip to first unread message

pure...@gmail.com

unread,
Aug 16, 2021, 9:16:20 AM8/16/21
to rez-config
Hello,

So I configure rez using a file that I point to via an env var like so:

    export REZ_CONFIG_FILE="/server/config/.rezconfig"

and my .rezconfig file looks like this:

{
packages_path: ["/local/rez/packages","/server/rez/packages"],
local_packages_path: "/local/rez/packages",
release_packages_path: "/server/rez/packages",
cache_packages_path = "/local/rez/cache",
}

but nothing ever gets written to   /local/rez/cache

looking at the docs, it seems like setting this path should be enough to enable caching

am I missing something or does it just not work? can someone else confirm that caching works for them?

Thorsten Kaufmann

unread,
Aug 16, 2021, 11:33:38 AM8/16/21
to rez-config
Setting said path is enough only if your packages are configured to be cacheable. If you have not set this anywhere you can also set a global default. See https://github.com/nerdvegas/rez/blob/049b1255aced707e8c7a6deb901b087735cb4d8f/src/rez/rezconfig.py#L226

Cheers,
Thorsten

pure...@gmail.com

unread,
Aug 16, 2021, 12:48:35 PM8/16/21
to rez-config
Thanks,

so now I have:

{
packages_path: ["/local/rez/packages","/server/rez/packages"],
local_packages_path: "/local/rez/packages",
release_packages_path: "/server/rez/packages",
cache_packages_path = "/local/rez/cache",
default_cachable = True,
}

But I still have nothing getting written to  /local/rez/cache

I also tried putting 
    cachable = True

in a package config, but seems to have made no difference.

I am not sure how to debug.  I added --verbose to the rez-env call but that didn't tell me much

R

pure...@gmail.com

unread,
Aug 16, 2021, 12:55:56 PM8/16/21
to rez-config
so I ran: 
rez pkg-cache

and got:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usage: rez pkg-cache [-h] [-a URI [URI ...] | --logs | -r URI [URI ...] |
                     --clean]
                     [-c {status,package,variant_uri,orig_path,cache_path} [{status,package,variant_uri,orig_path,cache_path} ...]]
                     [-f] [-v]
                     [DIR]
rez pkg-cache: error: DIR must be specified, as there is no configured 'cache_packages_path'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So it seems that the setting I have in my REZ_CONFIG_FILE is not being read.

I think this may be a bug?  I have checked that the other values in the file are being read, and they are.

R

Thorsten Kaufmann

unread,
Aug 16, 2021, 1:01:31 PM8/16/21
to rez-c...@googlegroups.com
When you run the rez-pkg-cache command you should see the status. Maybe there is a stalled process or something like that? Also keep in mind that copying is asynchronous.

Cheers,
Thorsten


--
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/yUa2xJDr834/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rez-config+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rez-config/f866805c-37b5-4455-a40b-2be0fe981811n%40googlegroups.com.

pure...@gmail.com

unread,
Aug 16, 2021, 1:06:50 PM8/16/21
to rez-config
hey again.

so setting the config via environment variables works. 
doing this:

export REZ_CACHE_PACKAGES_PATH="/rez/cache"

resulted in it working.

I can only conclude that either there is a bug, 
or I had some kind of formatting error or similar in my .rezconfig file. -but I cant see one.
I will set this config via environment variables for now.

Thanks for your help.

Braden Jennings

unread,
Apr 17, 2023, 6:16:22 PM4/17/23
to rez-config
What else do you need to trigger caching?

For example when I enter an environment for PySide2. Where PySide2 is on a shared network drive...
rez-env PySide2

I would like caching to be invoked, to copy the package into my local packages directory.
Reply all
Reply to author
Forward
0 new messages