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
Build of the extensions index is blocking due to extension waiting for user input #6912
Comments
This may be related to the following: introduced through the following pull-request: |
The function Ideally, the function should be contributed to Slicer itself. |
Once the function |
Related discourse post(s): |
Thank you for showing this issue. -2. OK, contributing the function to Slicer is not a problem, and will be done secondarily. -1. Fixing the popup showing itself seems immediately important. Referring to this resolution, would exiting the function at the very beginning by checking qSlicerApplication::application()->layoutManager() == nullptr be an acceptable solution ? |
Instead you could add something like this:
|
OK. As for 'StenosisMeasurement3D' module in SlicerVMTK, I think we could just remove that function from there to install 'ExtraMarkups', since that extension is now marked as dependency in SlicerVMTK. Secondarily, I'll request addition of that function, corrected, in Slicer : where in Slicer ? In which generic library ? |
At build time (and so during all testing performed at build time), extension dependencies are not installed (regardless of you list them in the dependencies or not). Therefore, you must exclude all tests from running automatically during build that require other extensions. See more details in this issue: #6529 |
Extension 'ExtraMarkups' is being checked and installed from server if necessary. This can block the extension index waiting for user input : See Slicer/Slicer#6912
Most extensions are implemented in Python and our recommendation has been to follow the example in the script repository. However, the example does not include the user confirmation popup, so users may forget about making it non-interactive in testing mode. To allow harmonizing the behavior between C++ and Python and between all extensions, I agree that it would be better to add a helper function to the extensions manager. We could start from the helper function that in VMTK. @chir-set would you like to submit a pull request to Slicer that adds the method you implemented? |
I've realized why this is not needed ever for C++ extensions! A C++ module is not even loaded if dependent DLLs are not found. Therefore, it cannot install missing extensions. Therefore, the helper function can be kept in Python. No need to add it to the C++ implementation. |
In fine, what should I do for this issue ? |
All you need to do is to remove qSlicerStenosisMeasurement3DModuleWidget::installExtensionFromServer from your module. We can later consider adding a Python function to harmonize how extensions are installed in Python. |
Yes, simplest solution. |
If functionality provided by an extension at runtime (e.g markups, dicom plugin,..) are relevant for a workflow. Installing them at runtime without a hard requirement at build time is sensible. While it doesn't have to happen to address this specific issue, I still think we should add the function to the extension manager, it will be useful when adding a metadata like |
Extension 'ExtraMarkups' is being checked and installed from server if necessary. This can block the extension index waiting for user input : See Slicer/Slicer#6912 'ExtraMarkups' is now a dependency of SlicerVMTK and is installed altogether in the GUI.
Until now the need for installing an extension in C++ has not come up, but I agree that in theory such use cases are possible (for example, a C++ module using a module implemented in Python). |
Extension 'ExtraMarkups' is being checked and installed from server if necessary. This can block the extension index waiting for user input : See Slicer/Slicer#6912 'ExtraMarkups' is now a dependency of SlicerVMTK and is installed altogether in the GUI.
Extension 'ExtraMarkups' is being checked and installed from server if necessary. This can block the extension index waiting for user input : See Slicer/Slicer#6912 'ExtraMarkups' is now a dependency of SlicerVMTK and is installed altogether in the GUI.
Update documentation to mention that extensions should not be installed as part of the tests. This means that dialog asking user to install extensions should be conditional implementing bool isTestingEnabled = qSlicerApplication::testAttribute(qSlicerCoreApplication::AA_EnableTesting);
if (isTestingEnabled)
{
// Do not block the execution with popup windows if testing mode is enabled.
return;
} |
Hi @jcfr, I'm abroad right now without any PC. I'll look into that in 2 weeks. cdash doesn't report a build failure for SlicerVMTK nor ExtraMarkups AFAIU. |
Hi @jcfr , Is this patch what you meant ? Regards. |
The application should not work very differently in testing mode. Skipping display of an information/confirmation popup is a minor behavior change, which should be fine. However, silently not installing dependencies of an extension would be a major behavior change, which should not be done just because we are in testing mode. |
The patch now shows dialog boxes when not in testing mode, and always installs a requested extension. |
Summary
After connecting to the windows factory using VNC, I was able to observe that the ExtraMarkups extension was showing a popup dialog and expecting the user to click.
Steps to reproduce
NA
Expected behavior
No popup should be displayed.
Environment
The text was updated successfully, but these errors were encountered: