-
Notifications
You must be signed in to change notification settings - Fork 129
Support for mutliple installed versions - 3.13 #3605
Support for mutliple installed versions - 3.13 #3605
Conversation
Task linked: OP-3458 Support for multiple build versions |
This is re-opened version of #3456 based on correct branch to simplify review. |
when finding local version, stop crashing if directory to search doesn't exist - this will allow to just use build version
and fixing the error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is just a small issue with log output of available versions as 3.9.1 should not be mentioned as the Latest available
2022-08-04 13:26:08: 0: PYTHON: >>> Injecting OpenPype environments ...
2022-08-04 13:26:08: 0: PYTHON: >>> Getting OpenPype executable ...
2022-08-04 13:26:08: 0: PYTHON: >>> Scanning for compatible requested version 3.12.2-nightly.3
2022-08-04 13:26:08: 0: PYTHON: --- Looking for OpenPype at: d:\REPO\
2022-08-04 13:26:08: 0: PYTHON: - found: 3.12.2 - d:\REPO\build_3.12.2-nightly.3
2022-08-04 13:26:08: 0: PYTHON: - found: 3.9.1 - d:\REPO\build_3.9.1
2022-08-04 13:26:08: 0: PYTHON: ! path is not a build: d:\REPO\OpenPype
2022-08-04 13:26:08: 0: PYTHON: ! path is not a build: d:\REPO\OpenPypeDefault
2022-08-04 13:26:08: 0: PYTHON: - found: 3.9.0 - d:\REPO\OpenPypeInstal
2022-08-04 13:26:08: 0: PYTHON: Looking for OpenPype at: D:\utils\customOpenPypeCommands
2022-08-04 13:26:08: 0: PYTHON: *** Latest available version found is 3.9.1
2022-08-04 13:26:08: 0: PYTHON: *** Latest compatible version found is 3.12.2
2022-08-04 13:26:08: 0: PYTHON: --- OpenPype executable: d:\REPO\build_3.12.2-nightly.3\openpype_console.exe
other than that, it is working correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works as expected.
versions in log output are properly recognized now.
I'm running into issues after this PR. Could you tell me the difference now between OpenPype executables and the OpenPype installation directories? Why do I need to set both? Doesn't that conflict each other? |
It works like this: ZIP updates are installed as usual to So ZIPs are coming as usual from update repository (there is no change there) but only zips matching So that's how updates work, but for builds, we need reverse logic for Deadline. Windows installer now installs OpenPype build to subfolder based on its versions - so before it was (on Windows) Now with the Deadline, you need to tell it where it can find those builds (because they can be installe anywhere). Job on Deadline will request What is the issue you are running into? |
Latest develop broke Deadline jobs on our end when:
Some logs:
The deadline logic also doesn't find the installed appdata zip version it seems:
Anyhow, the issue is basically that it tries to force reinstall and breaks the OpenPype installations by deleting half the files until it hits the permission error. And it thus fails all Deadline jobs. Only workaround I was able to put in place is to put this in # in GlobalJobPreLoad.py -> inject_openpype_environment...
# TODO: Hardcode disable OpenPype Version!
print("DISABLING OPENPYPE_VERSION ENVIRONMENT KEY!")
os.environ.pop("OPENPYPE_VERSION", None)
requested_version = None |
Ok, reinstalling is strange, I'll investigate.
this is listing only compatible builds it can find, once it finds the correct one, it will start it and then it will automatically elevate to the zip version (the build is use only to bootstrap) |
The reinstalling happens here as mentioned on Discord. |
@antirotor any chance you have pointers to fix this? :) The workaround I mentioned works for 99% of our cases but somehow we still occasionally get the issue with Publish jobs if the user is running OpenPype locally too. Probably because that one still (logically) gets It's getting really annoying to restore the workstations by killing all running openpype instances on the machine, force deleting the folders and then forcing the correct update/reinstall each time because Deadline ends up "deleting half the files" with a force reinstall of an existing version that's in use. |
I think this is fixing it: |
Feature
This PR is adding support for multiple installed versions (builds) on the same system. It will allow easy rollback and testing on farms and without disrupting existing running sessions.
On Deadline, it is now passing OpenPype version as
OPENPYPE_VERSION
to the job. If this environment variable is found on the job, Deadline will try to find compatible version build to use for launching that version of OpenPype. So if job was submitted from OpenPype version3.12.2
Deadline will try to find any build that matches3.12
and will use the latest available. Deadline will try to find it in directories specified inOpenPypeInstallationDirs
configuration option.It relies on functionality implemented here #3445.
Deployment Notes
Since #3445 you can have multiple versions of OpenPype installed on Windows. This was possible even before with Linux, but it was missing logic that will load only versions from the update zips/repository compatible with the currently running build.
So with this PR, running build will "see" only versions compatible with it and will use only them. For Deadline, where this process is reversed - you know what version was used to create the submission and you need to find correct build to launch it, you need to put builds under some common directory do OpenPype can detect them. On Windows, this is by default
C:\Program Files (x86)\OpenPype
but it can be any directory following logic that its direct subdirectories should contain separate build available. So with Deadline, you need to point it to the directory with following structure:/some/op/dir/3.12.2-nightly.2
,/some/op/dir/3.13.0
and so on.Testing
For proper testing, you need to create few "mock" build versions of OpenPype. It should be enough to change
openpype/version.py
and runningtools/build.ps1|sh
and after each run store produced version somewhere.Visibility of compatible versions
OpenPype should by default see only versions compatible with the running build. So issuing command like:
or
should show only versions compatible with that particular build.
Deadline
When testing, don't forget to update Deadline plugins in Deadline repository.
You need to configure OpenPype Deadline plugin:
Add path to OpenPype Installation Directories. This is path-per-line, first found is used.
Jobs submitted to Deadline should have set
OPENPYPE_VERSION
to correct one. In job log, you should find messages about version resolution.Implementation steps:
🧑🏭 TODO: find out how to deal with multiple installations on mac.
Resolves #3415
Resolves #3416
Resolves #3439
Footnotes
This would go over all specified path to OpenPype in Deadline and try to find requested version among them. ↩