-
Notifications
You must be signed in to change notification settings - Fork 129
Maya: Testing - OP-5060 #5644
Maya: Testing - OP-5060 #5644
Conversation
I suspect the plugins for e.g. Houdini failing to load correctly when running tests for Maya would show "errored plugins" which might not be what you'd want when running tests since you'd expect tests to run without errors :) |
Yup @BigRoy is right. When testing and validating the publish results we don't want any errors even if they are trivial like skipping plugins due to imports. |
Cool, will get on splitting this PR into smaller ones. |
Because we're splitting OpenPype into ayon-core and individual host addons, this PR would have to be re-created to target one of those. Testing infrastructure specifically will most probably move to a separate repo and this one is almost fully broken up and merge anyways. |
DO NOT MERGE
This is now acting as a checklist only.
Changelog Description
This turned into a monstrosity of a PR, so soz! We can split out features if needed but I think they are all needed to improve the testing workflow.
A lot of the focus has been on workflow improvement and transparency of data. I think for testing we should have all data in the repository rather than on cloud storage, because it'll help with external collaborators. There is an argument about data file sizes eventually, but I think we should start with the smallest tests first and build up to large data sizes. Once we hit file size issues, we can evaluate our options but more and faster testing should be the goal at the moment.
I have not tested all applications with these new changes as I wanted to present the workflow first, then I can adjust other hosts to fit the new workflow.
Features:
-I
which will isolate the environment from the user, but this flag does not work in 2022.openpype_mongo
command flag for explicit MongoDB address.keep_app_open
command flag. This will stop closing of the host for interactive inspection. Find this useful to work with the testing scene data in context of the host, just like you would launch the host normally.app_group
command flag. This is for changing which flavour of the host to launch. In the case of Maya, you can launch Maya and MayaPy, but it can be used for the Nuke family as well.app_variant
acceptsall
value. This will fetch all available variants of the host to test against. Each app variant gets its own testing session with output files and database. App variant testing is parametized so it makes it clearer in the output logging.dump_databases
command flag. This will dump all databases for the app variant. This helps with updating the expected database. This flag will skip all tests.find_all_available_variants_for_group
method for finding all available host variants.Changes:
test_data_folder
command flag changed todata_folder
.0
so the review resolution in inherited from the input.setup_only
will skip all tests.The idea with having MayaPy as a testing host, is that we can now run the tests in a docker container on for CI. I think we should run the tests on PRs on the latest version of MayaPy (2024), then maybe at a later point in the git workflow, we can run more elaborate tests on multiple versions of Maya.
Further thoughts:
xdist
for pytest, we could run the testing of the app variants in parallel. We would also need to spin up multiple Deadline workers but it could reduce the testing time.Testing notes:
NOTE: TESTING WILL EASE DATABASE, SO BACKUP LOCAL DATABASE OR POINT TO A NEW ONE!