Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Merge cli and cli_commands #802

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Conversation

iLLiCiTiT
Copy link
Member

Changelog Description

Removed cli_commands.py and moved the content to cli.py.

Additional info

Content of cli_commands.py did shrunk to import of function and calling the function, which can happen in cli.py directly without need to maintaining 2 files.

Create new function for cli publish in ayon_core/pipeline/publish/lib.py which does what Commands publish function did.

Testing notes:

All commands should be working as before.

  1. Make sure that publish command is working as expected, it is used on farm (e.g. deadline publish).

@iLLiCiTiT iLLiCiTiT requested review from BigRoy, kalisp and antirotor July 25, 2024 13:59
@ynbot ynbot added size/S type: enhancement Improvement of existing functionality or minor addition labels Jul 25, 2024
Copy link
Collaborator

@BigRoy BigRoy left a comment

Choose a reason for hiding this comment

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

Had to create the addon and upload it to avoid this error, from recent PR #793

2024-07-25 16:12:17:  0: STDOUT: Traceback (most recent call last):
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-core\client\ayon_core\cli.py", line 331, in main
2024-07-25 16:12:17:  0: STDOUT:     main_cli(
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1157, in __call__
2024-07-25 16:12:17:  0: STDOUT:     return self.main(*args, **kwargs)
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1078, in main
2024-07-25 16:12:17:  0: STDOUT:     rv = self.invoke(ctx)
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1688, in invoke
2024-07-25 16:12:17:  0: STDOUT:     return _process_result(sub_ctx.command.invoke(sub_ctx))
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1688, in invoke
2024-07-25 16:12:17:  0: STDOUT:     return _process_result(sub_ctx.command.invoke(sub_ctx))
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1688, in invoke
2024-07-25 16:12:17:  0: STDOUT:     return _process_result(sub_ctx.command.invoke(sub_ctx))
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 1434, in invoke
2024-07-25 16:12:17:  0: STDOUT:     return ctx.invoke(self.callback, **ctx.params)
2024-07-25 16:12:17:  0: STDOUT:   File "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2406251801_windows.zip\runtime\click\core.py", line 783, in invoke
2024-07-25 16:12:17:  0: STDOUT:     return __callback(*args, **kwargs)
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-applications\client\ayon_applications\addon.py", line 298, in _cli_extract_environments
2024-07-25 16:12:17:  0: STDOUT:     env = self.get_farm_publish_environment_variables(
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-applications\client\ayon_applications\addon.py", line 89, in get_farm_publish_environment_variables
2024-07-25 16:12:17:  0: STDOUT:     return self.get_app_environments_for_context(
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-applications\client\ayon_applications\addon.py", line 52, in get_app_environments_for_context
2024-07-25 16:12:17:  0: STDOUT:     return get_app_environments_for_context(
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-applications\client\ayon_applications\utils.py", line 187, in get_app_environments_for_context
2024-07-25 16:12:17:  0: STDOUT:     context.run_prelaunch_hooks()
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-applications\client\ayon_applications\manager.py", line 581, in run_prelaunch_hooks
2024-07-25 16:12:17:  0: STDOUT:     prelaunch_hook.execute()
2024-07-25 16:12:17:  0: STDOUT:   File "E:\dev\ayon-core\client\ayon_core\hooks\pre_filter_farm_environments.py", line 26, in execute
2024-07-25 16:12:17:  0: STDOUT:     project_settings["core"]["filter_env_profiles"])
2024-07-25 16:12:17:  0: STDOUT: KeyError: 'filter_env_profiles'

After that submission to deadline from fusion plus deadline render + publish worked.

@iLLiCiTiT iLLiCiTiT merged commit 826412c into develop Jul 25, 2024
1 check passed
@iLLiCiTiT iLLiCiTiT deleted the enhancement/reduce-cli-commands branch July 25, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants