My goal was to use a standard single-root project configuration, but instead of setting up the 'primary' storage location in roots.yml, I'd use another one in order to relocate the entire project.
SGTK configuration supports multiple roots, which would allow part of the project to be located on a different storage location, which made me believe the aforementioned use-case would just work. However, it seems the code is very dependent on a 'primary' storage location to be present. The PipelineConfiguration type for example asserts this explicitly, as seen here: https://github.com/shotgunsoftware/tk-core/blob/master/python/tank/pipelineconfig.py#L1098 .
What seems to work though is to manipulate the roots.yml to have a 'primary' key, which contains the same information as the storage location you actually want to use. That way, roots.yml doesn't match the respective shotgun LocalStorage entities anymore, which for now doesn't seem to be an issue as the cache is always used.
When automating project creation, the current tank implementation requires some monkey-patching to make this work nonetheless. An example can be found here: https://github.com/Byron/btank/blob/master/src/python/btank/commands.py#L81 .
Is there something I am missing ?