BlendluxCore: Development and Release Workflow #984
Replies: 6 comments 2 replies
-
Hello, This is a good job! I mostly agree with all above. A few comments though:
Well, that's not totally true. There are some cache techniques employed to speed up the build of the wheels. However, properly building a wheel requires to build completely (and in a container, for Linux version) and to repair it. That is what makes the wheels capable to run in all environments; but the counterpart is a somewhat long build time.... |
Beta Was this translation helpful? Give feedback.
-
The process has been implemented and tested on my side. The performance optimization to avoid unnecessary downloads is achieved by writing small text file Another important step I had to realize was missing to clear the As a failsave, I am now moving the files into What I have not yet done is teh renaming of the environment variables as suggested in the original post. Any comments on that? Further testing during upcoming development is also needed regarding the swapping of only the pyluxcore binary library, but I believe the current performance optimisation skip will cover this. |
Beta Was this translation helpful? Give feedback.
-
I've read more carefully your proposal, and I add here a few comments: Variable typesIt's not clear what kind of variables/constants they are. I will assume: _PYLUXCORE_VERSION - Python constant Just tell me if I'm wrong. _PYLUXCORE_VERSIONThere shouldn't be a possible "LATEST" value. A given BlendLuxCore version should be locked to an explicit PyLuxCore version, and that's all for me. The rationale is:
If we need to upgrade the PLC version used in BlendLuxCore, the answer is to make a new (sub)version of BLC. I would also remove the leading underscore in _PYLUXCORE_VERSION. BLC_WHEEL_PATHI'm not comfortable with your "SKIP" value:
Hacked wheelsIt may be possible to add a feature to the build system to craft a hacked wheel from a pyluxcore lib, even if that pyluxcore has not been compiled under the conditions of a wheel. This could be invoked, for example, by In particular, I'm not fully comfortable with the Blender extension commandsNote that Blender has some interesting CLI commands to handle extensions: They might be interesting to automate some install / debug tasks? |
Beta Was this translation helpful? Give feedback.
-
Yes, sorry, not enough bandwidth (and wanted to close some topics on my side: dependencies certificate, especially). Saving the state in a file is a simple and robust solution. Even though you might prefer some structured format like json, over plain text. Question however: isn't there already a config file attached to BLC? If so, wouldn't it be preferable to merge our information into this file? If not, isn't it the opportunity to create such a file? Another question: does Blender not provide such a mechanism of property saving, via its API?
OK, let's keep it.
Well, not a precise one. It just creates a general opportunity to inject code, but it may not be worse than other existing ones.
No problem, that was just prospective. |
Beta Was this translation helpful? Give feedback.
-
Update: I am so far satisfied with the general workflow and don't see any further conceptual actions. What remains to sort out is the process on Windows of using freshly compiled binaries in BlendLuxCore (or the pyluxcore wheel in general). macOS possibly as well, but unclear due to lack of dedicated, active developer. |
Beta Was this translation helpful? Give feedback.
-
Update with the release of BlendLuxCore v2.10.0:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
We already discussed the new release mechanism using wheels and a new versioning strategy, see also https://github.com/orgs/LuxCoreRender/discussions/983.
In this discussion, I would like to dive a step further, into the implementation in BlendLuxCore and the implications for an efficient workflow during all development stages (that is not just serving my personal taste 😉).
For context: During the last couple of months, we made use of two environment variables
BLC_WHEEL_PATH
andBLC_DEV_PATH
for this purpose.Scenarios
I divide this discussion into a few different application scenarios and discuss their individual requirements and proposed solutions.
"Normal Use" and "Development" are the most frequent, daily applications,
while "Feature testing by Users" and "Bug Fixing with User Feedback" are less frequent, but have unique requirements.
Normal Use
In normal use, BlendLuxCore is installed as bundled.
__init__.py
. I propose to call this variable_PYLUXCORE_VERSION
.This scenario seems clear and straightforward.
Development
To facilitate (time-)efficient development, it is desirable to reduce the number of build- and installation processes.
We can subdivide into several steps:
Development of the BlendLuxCore python-code (w/o change to pyluxcore)
BLC_DEV_PATH
environment variable.Development of LuxCore (Feature development or bug fixing alike)
make pyluxcore
. This builds only the library.site-packages/
folder.RECORD
file) is not checked.Testing of a pyluxcore wheel before release.
BLC_WHEEL_PATH
mechanism.Testing of a BlendLuxCore wheel, incl. corresponding pyluxcore version, before a release.
Feature Testing by Users
For feature testing, two paths are foreseen:
For getting early feedback from users and involving our more enthusiastic user base, it shall be possible to obtain and use development versions of the code.
BLC_WHEEL_PATH
must be accessible to, and easy enough for less programming-affine users.For testing BlendLuxCore only, without changes to pyluxcore, I would say this is solved by the already established "bundle_latest.yml" workflow.
For changes to pyluxcore, I propose to offer a second mechanism as an alternative to the
BLC_WHEEL_PATH
as an environment variable.BlendLuxCore/
BlendLuxCore/pyluxcore_custom/
~/
or%APPDATA%
, only the Blender version number is individual)Bug Fixing with User Feedback
This case is essentially the same as was presented for nightly builds. However, I want to separate it to stress a particular importance to make this efficient:
Issue LuxCoreRender/LuxCore#645 can be considered as a recent example. This bug is hardware- and driver-specific and thus not reproducible for active developers. We must thus rely on support and feedback by the reporting user, other LuxCore-community members or even maintainers of external dependencies. In the example, the user obviously has advanced programming knowledge, knows LuxCore already, and is motivated to investigate C++ code themselves. This can not generally be expected.
If we wish to get as much support as possible, we should strive to make it easy for users.
Proposed Implementation in BlendLuxCore
_PYLUXCORE_VERSION
"LATEST"
. In this case, the latest version is downloaded using pip.BLC_WHEEL_PATH
will override this variable as described below.BLC_WHEEL_PATH
For this variable I propose the following order of priority:
BLC_WHEEL_PATH == "SKIP"
:BLC_WHEEL_PATH
is otherwise set with a local path to a wheel:BLC_WHEEL_PATH
is not set, but a wheel is found inBlendLuxCore/pyluxcore_custom/
BLC_WHEEL_PATH
is not set, and no wheel is found inBlendLuxCore/pyluxcore_custom/
_PYLUXCORE_VERSION
is installed via pip.An open issue with this approach is the downgrading of wheels. Currently, the exact wheel version is updated each time in
blender_manifest.toml
, but Blender does not perform a downgrade.We must find a way to properly enforce this to avoid the mistake of testing the wrong wheel. This applies particularly during bugfixing where the version doesn't change.
A further performance optimization would be to compare the currently installed pyluxcore against the expected version.
Currently, I observe that BlendLuxCore dominates the startup time of Blender because some form of
pip download
is always executed and the process takes some time even for the local wheel.This step might involve hashes of the library file.
BLC_DEV_PATH
BLC_DEV_PATH
is used last.__init__.py
itself and all functions defined therein.BLC_WHEEL_PATH
and_PYLUXCORE_VERSION
are executed before this happens, therefore the__init__.py
in the Blender extension folder has to be edited directly for testing changes to those mechanisms.Open Items and discussion points
BLC_WHEEL_PATH
-->BLC_PYLUXCORE_WHEEL_PATH
? --> Kept name for nowBLC_DEV_PATH
-->BLC_GIT_REPOSITORY_PATH
? --> Kept name for now_PYLUXCORE_VERSION
--> leading underscore or not ? --> NoBlendLuxCore/pyluxcore_custom/
Beta Was this translation helpful? Give feedback.
All reactions