Skip to content

Add support for locally pre-installed USD resolver binaries#106

Closed
cpt-cabbage wants to merge 5 commits intoynput:developfrom
cpt-cabbage:pr-branch
Closed

Add support for locally pre-installed USD resolver binaries#106
cpt-cabbage wants to merge 5 commits intoynput:developfrom
cpt-cabbage:pr-branch

Conversation

@cpt-cabbage
Copy link
Copy Markdown

@cpt-cabbage cpt-cabbage commented Feb 20, 2026

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 Paths setting 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:

  • enabling pre_resolver_init hook for farm_publish launches with fallback that skips lakeFS download when no local path is configured on the worker
  • Add CollectResolverEnvVars publish 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 worker

Other improvements

  • Hardened addon data JSON reading to handle missing or corrupt files instead of crashing

Note: This is a massive WIP but I'd like any feedback in the meantime while we are still working on this

Luma and others added 3 commits February 18, 2026 13:33
…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
@MustafaJafar
Copy link
Copy Markdown
Member

Could you create an issue for it?

@MustafaJafar MustafaJafar added type: enhancement Improvement of existing functionality or minor addition community Issues and PRs coming from the community members labels Mar 31, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +40 to +48
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
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +11
import os

Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused import: os is imported but never referenced in this plugin. Please remove it to avoid lint failures and keep the module minimal.

Suggested change
import os

Copilot uses AI. Check for mistakes.
@ynput ynput deleted a comment from Copilot AI Apr 13, 2026
@ynput ynput deleted a comment from Copilot AI Apr 13, 2026
@tadeas-hejnic
Copy link
Copy Markdown
Contributor

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.

@cpt-cabbage
Copy link
Copy Markdown
Author

cpt-cabbage commented Apr 24, 2026

Great! Let me know if you'd like me to test anything on our farm. @tadeas-hejnic

@tadeas-hejnic
Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants