ynput / ayon-deadline

Deadline addon for AYON
Apache License 2.0
2 stars 4 forks source link

Pass staging as settings variant #8

Closed kalisp closed 2 months ago

kalisp commented 2 months ago

If -use-staging is used in published job, this will propagate it to the AYON process for environment extraction. Must use command line argument, environment variable won't get picked up.

This requires redeploy of GlobalJobPreLoad.py!

kalisp commented 2 months ago

Is your AYON-Staging marked as Staging? Are you running your Tray with --use-staging. BTW GlobalJobPreLoad.py must be redeployed to your DL repo.

MustafaJafar commented 2 months ago

Is your AYON-Staging marked as Staging?

yes, image

Are you running your Tray with --use-staging.

yes,

E:\Ynput\ayon-launcher>.poetry\bin\poetry.exe run python start.py --use-staging
>>> Connected to AYON server http://192.168.1.4:5000
DEV WARNING: Addon 'colorbleed' does not have defined version.
DEV WARNING: Addon 'my_studio_addon' does not have defined version.
*** AYON [1.0.4-dev.1] ---------------------------------------------------------------------------------------------------------------------  
>>> Using AYON from [ E:\Ynput\ayon-launcher ]
... AYON variant: [ staging ]
... AYON bundle:  [ AYON-Staging ]

BTW GlobalJobPreLoad.py must be redeployed to your DL repo.

and, yes image

iLLiCiTiT commented 2 months ago

So, @MustafaJafar based on the output you pasted, it works.

MustafaJafar commented 2 months ago

So, @MustafaJafar based on the output you pasted, it works.

Although deadline jobs run successfully, but I'm wondering about these lines in my deadline logs. I think it should get staging variant in my staging bundle.

2024-07-09 16:28:50:  0: STDOUT: >>> Using AYON from [ E:\Ynput\ayon-launcher ]
2024-07-09 16:28:50:  0: STDOUT: ... AYON variant: [ production ]
2024-07-09 16:28:50:  0: STDOUT: ... AYON bundle:  [ AYON-Staging ]
MustafaJafar commented 2 months ago

After a chat with kalis, It worked for me after adding these two lines

        self.EnvironmentKeyValue["AYON_DEFAULT_SETTINGS_VARIANT"] = (
            os.environ["AYON_DEFAULT_SETTINGS_VARIANT"])

at the end of this method

https://github.com/ynput/ayon-deadline/blob/d4d8ac596616bfbe609b09808123a021b55a8c7f/client/ayon_deadline/abstract_submit_deadline.py#L400-L404


Snippets from deadline log

2024-07-09 20:26:57:  0: PYTHON: >>> Executing: E:\Ynput\ayon-launcher\tools\ayon_console.bat --headless addon applications extractenvironments C:\Users\MUSTAF~1\AppData\Local\Temp\20240709172657806203_719e3bf4-3e18-11ef-ae22-f02f74db125e.json --use-staging --envgroup farm --project Robo --folder /Assets/Character/bigrobo --task cfx --app houdini/19-5-805
2024-07-09 20:26:57:  0: STDOUT: E:\Ynput\ayon-launcher\tools>goto comment 
2024-07-09 20:26:57:  0: STDOUT: E:\Ynput\ayon-launcher\tools>cd "E:\Ynput\ayon-launcher\tools\\.." 
2024-07-09 20:26:57:  0: STDOUT: E:\Ynput\ayon-launcher>.poetry\bin\poetry.exe run python start.py --headless addon applications extractenvironments C:\Users\MUSTAF~1\AppData\Local\Temp\20240709172657806203_719e3bf4-3e18-11ef-ae22-f02f74db125e.json --use-staging --envgroup farm --project Robo --folder /Assets/Character/bigrobo --task cfx --app houdini/19-5-805 
2024-07-09 20:26:59:  0: STDOUT: >>> [  Setting OCIO environment to config path: C:\Users\Mustafa Taher\AppData\Local\Ynput\AYON\addons\ayon_ocio_1.1.2-dev.1\ayon_ocio\configs\OpenColorIOConfigs\aces_1.2\config.ocio  ] 
2024-07-09 20:26:59:  0: STDOUT: >>> Connected to AYON server http://192.168.1.4:5000
2024-07-09 20:26:59:  0: STDOUT: DEV WARNING: Addon 'colorbleed' does not have defined version.
2024-07-09 20:26:59:  0: STDOUT: DEV WARNING: Addon 'my_studio_addon' does not have defined version.
2024-07-09 20:26:59:  0: STDOUT: *** AYON [1.0.4-dev.1] 
2024-07-09 20:26:59:  0: STDOUT: >>> Using AYON from [ E:\Ynput\ayon-launcher ]
2024-07-09 20:26:59:  0: STDOUT: ... AYON variant: [ staging ]
2024-07-09 20:26:59:  0: STDOUT: ... AYON bundle:  [ AYON-Staging ]