-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Create UpdateManager
plugin to handle updates for the conda-based installers
#21483
Conversation
f1d084f
to
50a3bf6
Compare
6c05112
to
e5bcfb7
Compare
e5bcfb7
to
d2d3238
Compare
9f88a27
to
d209f24
Compare
d209f24
to
6344aba
Compare
Checked this locally and not totally sure if I'm doing things correctly but seems like I'm unable to trigger a major release update 🤔 I was able to trigger a minor release update manually though 👍 Steps followed (extrapolating from the steps at #20900 (comment))
Update Flow that partially worked (minor version, check via manual trigger)
Update Flow that didn't work (major version - the update available dialog showed me 5.5.0 always)
It's possible that I'm missing setting up something (for example I didn't change the updates worker code since seems like the url should point to the GitHub release page which has the alpha release?) so will try to check again |
@dalthviz, thanks for looking at this! I think I found the issue. When getting a list of updates from GitHub, the versions are listed in chronologically released order, rather than release order, so I'll fix this and push it up. |
@dalthviz, I've pushed up fixes. |
3ae3121
to
52818db
Compare
Checking again seems like once a check for updates is started things are working as expected (at least for the most straightforward flow where you say Minor release update:
Major release update (with the option to get only stable release unchecked):
Will try now to test other actions combinations (like for example cancel the download or select to install the update after closing Spyder) and document anything if I manage to see any weird behaviors or issues |
@dalthviz, thanks for following up. I'll investigate why Spyder does not check for updates at startup.
I agree that this should be done at some point. We can discuss whether we should defer until later or not, depending on how involved such a check would be. |
52818db
to
0f4b96f
Compare
@dalthviz, I found the issue and pushed up the fix. It was just a typo preventing checking for update at startup. |
Awesome! Indeed, seems like now the automatic check for updates on startup works 👍 Started checking some other actions combinations and noticed the following when doing a major release update:
Maybe we need to save the downloaded installer somehow and skip that step when clicking the status bar if that was already done? Also, I think I got to see the |
…d error logging levels trigger Spyder's Issue reporter.
UpdateManagerStatus will always have custom_widget and spinner attributes after initialization.
* Restore "Check for updates on startup" check box to Application plugin preference page. * Add "Check for stable releases only" check box to Application plugin preference page.
4c0a3ae
to
7b6b1a9
Compare
558865e
to
7b6b1a9
Compare
… "HTTPError: 403 Client Error: rate limit exceeded for url: https://api.github.com/repos/spyder-ide/spyder/releases"
Giving this a new manual check locally, seems like there is an issue related with the settings (the report error dialog pop-up when unchecking the Traceback (most recent call last):
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\plugins\preferences\widgets\configdialog.py", line 185, in button_clicked
configpage.apply_changes()
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\plugins\preferences\widgets\config_widgets.py", line 119, in apply_changes
self.apply_callback()
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\plugins\preferences\widgets\config_widgets.py", line 154, in <lambda>
apply_callback=lambda: self._apply_settings_tabs(
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\plugins\preferences\widgets\config_widgets.py", line 193, in _apply_settings_tabs
self.apply_settings(options)
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\plugins\application\confpage.py", line 286, in apply_settings
um = self.plugin.get_plugin(Plugins.UpdateManager, error=False)
File "C:\Users\dalth\AppData\Local\spyder-6\envs\spyder-runtime\lib\site-packages\spyder\api\plugins\new_api.py", line 444, in get_plugin
raise SpyderAPIError(
spyder.api.exceptions.SpyderAPIError: Plugin "update_manager" not part of REQUIRES or OPTIONAL requirements!
Also, I noticed that there are a couple of |
Thanks @dalthviz. I'll add |
For macOS and Linux, do not run installer if uninstaller is cancelled or fails.
…ther than a blank line.
This should be fixed now also. |
Checked again locally and seems like everything is working 🎉 so this LGTM 👍 |
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.
Thanks @mrclary for your work on this!
UpdateManager
plugin to handle updates for the conda-based installers
Thanks @dalthviz and @ccordoba12 for all the feedback! |
Description of Changes
General Changes
Application
plugin to its ownUpdateManager
plugin. This allows a simplified paradigm where the plugin container can take the role of signal dispatcher between the mainUpdateManagerWidget
and theUpdateManagerStatus
status bar widget.requests
instead ofurllib
for updates #21423, and PR: Follow-up to using therequests
library for updates #21433).Update Flow
Class Mermaid Map
Issue(s) Resolved
Fixes #20831
Supersedes #20900
Interactive Testing
Interactive testing is most easily performed using the following script. Just copy and save this somewhere and run it from a Spyder developer environment.
interactive_test.py
However, this will only be interactive with the plugin. To test the full interactivity with Spyder, see the interactive instructions in #20900.