-
Notifications
You must be signed in to change notification settings - Fork 128
Fix windows post linking #38140
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
Fix windows post linking #38140
Conversation
I'll check the Windows conda install |
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.
I can confirm that workbench starts as expected when following the test instructions.
Since the windows test failure was not caused by these changes I am happy to approve.
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.
Conda install worked fine on my Windows machine.
…#39295) ### Description of work Move logic to set `QT_PLUGIN_PATH` from `post-link.bat` to Python. This will make Conda installs on Windows more robust. #### Summary of work The `post-link.bat` file included in the `mantidworkbench` conda recipe was added to set `QT_PLUGIN_PATH` to avoid the following error that prevents workbench from launching: ``` qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. ``` For some conda installs on Windows it was necessary to deactivate and reactivate the environment so that the `post-link.bat` takes effect. Not sure why. It has also been necessary to pin conda in [the past](#38140) when we were unable to install `mantidworkbench` to create the standalone package. Here we move the logic to Python, which avoids the need for the additional scripts in the conda recipe. This aligns with the recommendation that such scripts should [be avoided whenever possible](https://docs.conda.io/projects/conda-build/en/stable/resources/link-scripts.html). Fixes #38997 ### To test: 1. Install the standalone Windows from [here](https://builds.mantidproject.org/job/build_packages_from_branch/1100/) package and check that it launches 2. Install the conda package and check that it launches: `conda install thomashampson/label/qt_plugin_path_test::mantidworkbench -c mantid` <!-- Ensure the base of this PR is correct (e.g. release-next or main) Finally, don't forget to add the appropriate labels, milestones, etc.! --> --- ### Reviewer Please comment on the points listed below ([full description](http://developer.mantidproject.org/ReviewingAPullRequest.html)). **Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review.** If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed. #### Code Review - Is the code of an acceptable quality? - Does the code conform to the [coding standards](http://developer.mantidproject.org/Standards/)? - Are the unit tests small and test the class in isolation? - If there is GUI work does it follow the [GUI standards](http://developer.mantidproject.org/Standards/GUIStandards.html)? - If there are changes in the release notes then do they describe the changes appropriately? - Do the release notes conform to the [release notes guide](https://developer.mantidproject.org/Standards/ReleaseNotesGuide.html)? #### Functional Tests - Do changes function as described? Add comments below that describe the tests performed? - Do the changes handle unexpected situations, e.g. bad input? - Has the relevant (user and developer) documentation been added/updated? Does everything look good? Mark the review as **Approve**. A member of `@mantidproject/gatekeepers` will take care of it. ### Gatekeeper If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
…mantidproject#39295) ### Description of work Move logic to set `QT_PLUGIN_PATH` from `post-link.bat` to Python. This will make Conda installs on Windows more robust. #### Summary of work The `post-link.bat` file included in the `mantidworkbench` conda recipe was added to set `QT_PLUGIN_PATH` to avoid the following error that prevents workbench from launching: ``` qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. ``` For some conda installs on Windows it was necessary to deactivate and reactivate the environment so that the `post-link.bat` takes effect. Not sure why. It has also been necessary to pin conda in [the past](mantidproject#38140) when we were unable to install `mantidworkbench` to create the standalone package. Here we move the logic to Python, which avoids the need for the additional scripts in the conda recipe. This aligns with the recommendation that such scripts should [be avoided whenever possible](https://docs.conda.io/projects/conda-build/en/stable/resources/link-scripts.html). Fixes mantidproject#38997 ### To test: 1. Install the standalone Windows from [here](https://builds.mantidproject.org/job/build_packages_from_branch/1100/) package and check that it launches 2. Install the conda package and check that it launches: `conda install thomashampson/label/qt_plugin_path_test::mantidworkbench -c mantid` <!-- Ensure the base of this PR is correct (e.g. release-next or main) Finally, don't forget to add the appropriate labels, milestones, etc.! --> --- ### Reviewer Please comment on the points listed below ([full description](http://developer.mantidproject.org/ReviewingAPullRequest.html)). **Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review.** If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed. #### Code Review - Is the code of an acceptable quality? - Does the code conform to the [coding standards](http://developer.mantidproject.org/Standards/)? - Are the unit tests small and test the class in isolation? - If there is GUI work does it follow the [GUI standards](http://developer.mantidproject.org/Standards/GUIStandards.html)? - If there are changes in the release notes then do they describe the changes appropriately? - Do the release notes conform to the [release notes guide](https://developer.mantidproject.org/Standards/ReleaseNotesGuide.html)? #### Functional Tests - Do changes function as described? Add comments below that describe the tests performed? - Do the changes handle unexpected situations, e.g. bad input? - Has the relevant (user and developer) documentation been added/updated? Does everything look good? Mark the review as **Approve**. A member of `@mantidproject/gatekeepers` will take care of it. ### Gatekeeper If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
…mantidproject#39295) ### Description of work Move logic to set `QT_PLUGIN_PATH` from `post-link.bat` to Python. This will make Conda installs on Windows more robust. #### Summary of work The `post-link.bat` file included in the `mantidworkbench` conda recipe was added to set `QT_PLUGIN_PATH` to avoid the following error that prevents workbench from launching: ``` qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. ``` For some conda installs on Windows it was necessary to deactivate and reactivate the environment so that the `post-link.bat` takes effect. Not sure why. It has also been necessary to pin conda in [the past](mantidproject#38140) when we were unable to install `mantidworkbench` to create the standalone package. Here we move the logic to Python, which avoids the need for the additional scripts in the conda recipe. This aligns with the recommendation that such scripts should [be avoided whenever possible](https://docs.conda.io/projects/conda-build/en/stable/resources/link-scripts.html). Fixes mantidproject#38997 ### To test: 1. Install the standalone Windows from [here](https://builds.mantidproject.org/job/build_packages_from_branch/1100/) package and check that it launches 2. Install the conda package and check that it launches: `conda install thomashampson/label/qt_plugin_path_test::mantidworkbench -c mantid` <!-- Ensure the base of this PR is correct (e.g. release-next or main) Finally, don't forget to add the appropriate labels, milestones, etc.! --> --- ### Reviewer Please comment on the points listed below ([full description](http://developer.mantidproject.org/ReviewingAPullRequest.html)). **Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review.** If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed. #### Code Review - Is the code of an acceptable quality? - Does the code conform to the [coding standards](http://developer.mantidproject.org/Standards/)? - Are the unit tests small and test the class in isolation? - If there is GUI work does it follow the [GUI standards](http://developer.mantidproject.org/Standards/GUIStandards.html)? - If there are changes in the release notes then do they describe the changes appropriately? - Do the release notes conform to the [release notes guide](https://developer.mantidproject.org/Standards/ReleaseNotesGuide.html)? #### Functional Tests - Do changes function as described? Add comments below that describe the tests performed? - Do the changes handle unexpected situations, e.g. bad input? - Has the relevant (user and developer) documentation been added/updated? Does everything look good? Mark the review as **Approve**. A member of `@mantidproject/gatekeepers` will take care of it. ### Gatekeeper If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
Description of work
Something has changed between
conda
24.7 and 24.9 to cause a failure when installing themantidworkbench
package on our Windows CI machines. It fails at thepost-link.bat
stage, which is required to set a Qt plugin path environment variable:Pinning
conda
in thepackage-conda
environment appears circumvent the problem. We do this for now to get the nightly running and investigate further later. For some reason I wasn't able to reproduce the problem locally but since there were no code changes that could cause this it is almost certainly the conda version change that has broken it.There is no associated issue.
To test:
Verify the packages are build in this job:
https://builds.mantidproject.org/job/build_packages_from_branch/916/
Install the Windows conda package with:
and verify that it launches with the
workbench
command.This does not require release notes because it's a build script change
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.