Open garrett-wbpa opened 6 months ago
I've disabled variant shortlinks for my windows machine using a rez config json file
We don't support JSON config files. Is it a typo?
I definitely saved my file as .json, but I suspect it was loaded by PyYAML without me noticing. I've moved it to a .yaml.
This is the contents of the config file I was testing.
{
"plugins": {
"package_repository": {
"filesystem": {
"file_lock_type": "mkdir",
}
},
},
"use_variant_shortlinks":true,
"use_pyside": true,
"use_pyqt": false,
"gui_threads": true
}
Edit: I confirmed that I can use a YAML loader to load this dict, even though it was user error on my part.
Just to be sure that your config is loaded properly, would you mind giving me the result of rez-config use_variant_shortlinks
please?
Good point. I've just now confirmed that rez-config use_variant_shortlinks
returns False
and re-run my repro steps with the same issue. Oddly, I get a string formatting error when trying to copy a package containing the symlinked short variants, but no issue when copying something simple like os
.
REZ_CONFIG_FILE=/w/CREW/garrett.broussard/scripts/rez_config/rez_config_002.yaml rez-config use_variant_shortlinks
False
REZ_CONFIG_FILE=/w/CREW/garrett.broussard/scripts/rez_config/rez_config_002.yaml rez-cp --dest-path ~/wbpa/tmp/wbpa_001 --allow-empty pycue
Traceback (most recent call last):
File "C:\Users\garrett\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\garrett\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\opt\rez\Scripts\rez\rez-cp.exe\__main__.py", line 7, in <module>
File "c:\opt\rez\lib\site-packages\rez\cli\_entry_points.py", line 127, in run_rez_cp
return run("cp")
File "c:\opt\rez\lib\site-packages\rez\cli\_main.py", line 191, in run
returncode = run_cmd()
File "c:\opt\rez\lib\site-packages\rez\cli\_main.py", line 183, in run_cmd
return func(opts, opts.parser, extra_arg_groups)
File "c:\opt\rez\lib\site-packages\rez\cli\cp.py", line 156, in command
result = copy_package(
File "c:\opt\rez\lib\site-packages\rez\package_copy.py", line 202, in copy_package
_copy_variant_payload(
File "c:\opt\rez\lib\site-packages\rez\package_copy.py", line 249, in _copy_variant_payload
"Cannot copy source variant %s - its root does not appear to "
TypeError: not enough arguments for format string
Umm, that's an error in our code.
If should be:
raise PackageCopyError(
"Cannot copy source variant %s - its root does not appear to "
"be present on disk (%s)." % (src_variant.uri, variant_root)
)
Hello,
I've disabled variant shortlinks for my windows machine using a rez config json file. I went to rez-cp a package to my repository and noticed that rez-cp was still trying to create a _v shortlink folder. It fails due to permissions, but rez-cp continues on and copies the full variant folder anwyay.
Environment
To Reproduce
Expected behavior I expect rez-cp to skip the shortlink creation when the config specifies to do so.
Actual behavior A _v folder is created even though my config is disabling them.