Supporting Rez/Allzpark #560
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on #409, this PR adds the support of Rez/Allzpark styled environment setup and application launching workflow.
Preface
Let's compare the current and up-coming launcher first.
Current Launcher:
avalon.pipeline.Applicationand loads{app}.tomlIn Allzpark:
The difference between these two workflows are, other than Asset/Task selecting is not in Allzpark, working directory's initialization is not there as well.
Although selecting Asset/Task after application startup can be easily accepted with the help of Avalon's Workfile app, but the bottom line of doing any task is, there must be a working directory.
So with or without asset/task, we must define a working directory path in Allzpark.
But do we need to initialize it in Allzpark as well ?
By saying "in Allzpark", it means "in Rez package", which mainly used to build up environment so it's not a good fit for file system I/O related operations (it could, but not trivial).
Hence, the application that is being launched should be able to handle working directory's initialization itself.
TL;DR
So here's the goals for supporting new application launching process :
AVALON_ASSET,AVALON_TASKcan be undefinedAVALON_WORKDIRWhat's changed
pipeline.installwill initialize working directory if flag_AVALON_APP_INITIALIZEDis not set.AVALON_WORKDIRwill be respected if it's presented inSessionduring install.--, --if asset/task is undefined.AVALON_ASSET.New config schema 2.0 is added, for opt-out(reverted in b6429f5)apps.AVALON_SESSION_SCHEMAis added, for adopting new workflow.AVALON_APP_NAMEin session. This isn't new, just making it clearer.This PR does/should NOT change current workflow, just supporting new one.
Reference
Here's my current Avalon Rez package setup on adopting Allzpark :
https://github.com/davidlatwe/rez-park/blob/master/_pln/avalon/package.py
Noted that I am still using
{app}.tomlfiles for working directory initialization, but just the part of file copying and creating default dirs.https://github.com/davidlatwe/rez-park/tree/master/_pln/merlin/apps
Here's what it looks like :