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.
Changelog Description
GlobalPreLoadJob.py does respect
AYON_USE_STAGING
environment variable as replacement forAYON_DEFAULT_SETTINGS_VARIANT
.Additional review information
Environment variable
AYON_DEFAULT_SETTINGS_VARIANT
is still used for backwards compatibility. It is also explicitly set by deadline addon now, so ayon-core does not have to set it up for future deprecation.This change is preparation for future cleanup that can't happen now to keep backwards compatibility.
Logic leading to this change
We need to know if AYON process should happen as production, staging or dev. Dev is defined just by bundle name, production is also defined only by bundle name, and staging needs bundle name and
AYON_USE_STAGING
, so we don't needAYON_DEFAULT_SETTINGS_VARIANT
at all if we haveAYON_BUNDLE_NAME
andAYON_USE_STAGING
available.Future plans
We need to support backwards compatibility, so changing GlobalPreLoadJob might be dangerous now, as we probably should support bigger range of addon versions.
But when we bump requirement of ayon-core to
>1.1.1
we don't have to set upAYON_DEFAULT_SETTINGS_VARIANT
anymore, as staging will be defined byAYON_USE_STAGING
.Testing notes:
GlobalPreLoadJob.py
must be copied to deadline repository.AYON_DEFAULT_SETTINGS_VARIANT
.To validate new logic
AYON_DEFAULT_SETTINGS_VARIANT
fromcontext.data[FARM_JOB_ENV_DATA_KEY]
.Resolves #129