Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Add rez packages generation for server_addons #6169

Closed
wants to merge 5 commits into from

Conversation

Minkiu
Copy link
Contributor

@Minkiu Minkiu commented Jan 25, 2024

This commit will add a python script that allows us to quickly generate packages for ayon-backend ingestion, either by copying them to the rez repo (not advised) or installing them via the ayon-frontend by uploading the resulting zips of the script.

Changelog Description

This is a PR that will allow us to then test the functionality of this ayon-backend PR: ynput/ayon-backend#29

Instead of creating a folder structure at this step, we delegate it to the rezbuild.py on the ayon-backend which expects the package.py and the usual folder structure of the addon source code (https://github.com/ynput/ayon-addon-template), thus this step is greatly simplified where we only copy the contents of the addon, add a package.py and zip them up. The caveat of the openpype package is the same, so an extra step to copy the required things of OpenPype into the client folder.

Testing notes:

  1. Clone this branch
  2. Run python create_ayon_rez_addons.py
  3. Confirm zip archives have been generated in OpenPype/server_addon/rez_packages
  4. If you are running the backend with the rez implementation: Install the addon, enable it and make sure it is able to initialize.

TODO

  • Test all individual addons and change where required so they initialize in the backend

@ynbot ynbot added size/S Denotes a PR changes 100-499 lines, ignoring general files type: feature Larger, user affecting changes and completely new things labels Jan 25, 2024


if create_zip:
shutil.make_archive(
Copy link
Member

Choose a reason for hiding this comment

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

ZipFileLongPaths was used because shutil.make_archive did crash on Windows when a certain path length of path was used.

Copy link
Member

@iLLiCiTiT iLLiCiTiT Jan 25, 2024

Choose a reason for hiding this comment

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

And there is missing manifest file which is used when package is uploaded via frontend.

Copy link
Contributor Author

@Minkiu Minkiu Jan 31, 2024

Choose a reason for hiding this comment

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

ZipFileLongPaths was used because shutil.make_archive did crash on Windows when a certain path length of path was used.

Even with enabling longer than 260 char paths in Windows?

The manifest is no longer needed in this instance, the info is in the package.py this will only work with the rez backend.

Copy link
Member

@iLLiCiTiT iLLiCiTiT Jan 31, 2024

Choose a reason for hiding this comment

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

Even with enabling longer than 260 char paths in Windows?

Well, you have to enable it, and you have to know that you have to enable it, most people don't. They'll just tell "it's broken" or "it does not work".

This commit will add a `python` script that allows us to quickly generate packages for `ayon-backend` ingestion, either by copying them to the `rez` repo (not advised) or installing them via the `ayon-frontend` by uploading the resulting `zip`s of the script.
@Minkiu Minkiu force-pushed the feature/add_create_ayon_rez_adons branch from ba35435 to 52a1cd8 Compare January 31, 2024 14:07
@Minkiu Minkiu marked this pull request as ready for review January 31, 2024 14:10
@Minkiu Minkiu requested a review from iLLiCiTiT January 31, 2024 14:14
@mkolar
Copy link
Member

mkolar commented Feb 9, 2024

No point merging this here at this point. Let's port to AYON please @Minkiu

@mkolar mkolar closed this Feb 9, 2024
@ynbot ynbot added this to the next-patch milestone Feb 9, 2024
@Minkiu
Copy link
Contributor Author

Minkiu commented Feb 14, 2024

These changes are now in this PR: ynput/ayon-core#64

@jakubjezek001 jakubjezek001 removed this from the next-patch milestone Feb 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
port to AYON size/S Denotes a PR changes 100-499 lines, ignoring general files target: AYON target: OpenPype type: feature Larger, user affecting changes and completely new things
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants