Add support for locally pre-installed USD resolver binaries#106
Add support for locally pre-installed USD resolver binaries#106cpt-cabbage wants to merge 5 commits intoynput:developfrom
Conversation
…lver paths per app and platform, bypassing lakeFS downloads - Add get_local_resolver_path utility to match resolver by app name, alias, and platform - Update pre_resolver_init hook to prefer local resolver paths, support farm_publish launch type, and skip lakeFS on farm workers - Harden addon data JSON reading with error handling for missing/corrupt files - Add CollectResolverEnvVars publish plugin to forward resolver config vars (TF_DEBUG, logger settings) to farm job environments
|
Could you create an issue for it? |
There was a problem hiding this comment.
Pull request overview
Adds support for using locally pre-installed AYON USD resolver binaries (instead of lakeFS downloads) and improves farm publishing by forwarding resolver non-path environment variables and enabling resolver init for farm_publish launches.
Changes:
- Add a new “Local Resolver Paths” settings list to map app/platform to a resolver directory (with optional app aliases).
- Add local resolver selection + farm-specific lakeFS skip behavior in
pre_resolver_init, plus safer addon data JSON reads. - Add a publish plugin to forward non-path resolver config env vars into farm job submission.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| server/settings/main.py | Introduces the LocalResolverPathModel and exposes local_resolver_paths in binary distribution settings. |
| package.py | Updates addon version string. |
| client/ayon_usd/version.py | Keeps client-side version aligned with package version. |
| client/ayon_usd/utils.py | Adds get_local_resolver_path helper for local resolver path matching. |
| client/ayon_usd/plugins/publish/collect_resolver_env_vars.py | New publish collector to forward resolver non-path env vars into farm job data. |
| client/ayon_usd/hooks/pre_resolver_init.py | Uses local resolver path when configured; skips lakeFS on farm; hardens addon data JSON reading. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| self.log.error( | ||
| f"Local resolver path does not exist: {local_path}" | ||
| ) | ||
| return | ||
| self.log.info( | ||
| f"Using local resolver path for {self.app_name}: {local_path}" | ||
| ) | ||
| self._setup_resolver(local_path, project_settings) | ||
| return |
There was a problem hiding this comment.
If a local_resolver_path entry matches the app/platform but the directory does not exist, the hook returns early and prevents the lakeFS fallback for local launches. Consider logging a warning and falling back to lakeFS when launch_type is local (and only skipping on farm), so a misconfigured path doesn’t break artist workstations.
| self.log.error( | |
| f"Local resolver path does not exist: {local_path}" | |
| ) | |
| return | |
| self.log.info( | |
| f"Using local resolver path for {self.app_name}: {local_path}" | |
| ) | |
| self._setup_resolver(local_path, project_settings) | |
| return | |
| if is_farm: | |
| self.log.error( | |
| "Local resolver path does not exist for farm launch: " | |
| f"{local_path}. Skipping lakeFS download on farm worker." | |
| ) | |
| return | |
| self.log.warning( | |
| "Local resolver path does not exist: " | |
| f"{local_path}. Falling back to lakeFS resolver download." | |
| ) | |
| else: | |
| self.log.info( | |
| f"Using local resolver path for {self.app_name}: {local_path}" | |
| ) | |
| self._setup_resolver(local_path, project_settings) | |
| return |
| import os | ||
|
|
There was a problem hiding this comment.
Unused import: os is imported but never referenced in this plugin. Please remove it to avoid lint failures and keep the module minimal.
| import os |
|
I rewrote the code slightly and made the local distribution more general. I am closing this PR as I merged these changes with those in another PR. |
|
Great! Let me know if you'd like me to test anything on our farm. @tadeas-hejnic |
I think it's ready for testing. If you have the chance to test it in your setup, that would be great. |
Summary
This PR adds support for locally pre-installed USD resolver binaries and enables farm rendering with the AYON USD resolver.
Local resolver paths
Currently the USD addon only supports downloading the resolver from lakeFS. This works well for artist workstations, but doesn't suit environments where resolvers are already deployed to a shared location (e.g. a network mount) or where lakeFS isn't accessible.
This adds a new
Local Resolver Pathssetting under Binary Distribution that lets studios configure per-app and platform paths to desired resolver directories. When a match is found, the resolver is loaded directly and no lakeFS download needed. An app alias list is also supported so multiple app variants can share the same resolver.Farm publishing support
Farm workers typically don't have access to lakeFS, so resolver setup was failing on the farm. This PR addresses that by:
pre_resolver_inithook forfarm_publishlaunches with fallback that skips lakeFS download when no local path is configured on the workerCollectResolverEnvVarspublish plugin that forwards non-path resolver config (TF_DEBUG, logger settings) into the farm job environment. Path-based env vars (PXR_PLUGINPATH_NAME, PYTHONPATH, LD_LIBRARY_PATH) are intentionally excluded — these are set by the hook at render time for each workerOther improvements
Note: This is a massive WIP but I'd like any feedback in the meantime while we are still working on this