Skip to content
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: Only show UpdateManager statusbar widget while updating and when updates are available #21836

Merged
merged 22 commits into from
Apr 18, 2024

Conversation

mrclary
Copy link
Contributor

@mrclary mrclary commented Feb 27, 2024

Description of Changes

  • The update manager statusbar widget is now hidden except when
    • An update is available
    • Downloading an update
  • Bootstrap and dev versions no longer block checking for updates at startup. Bootstrap and editable installs of Spyder check for updates using the release url.
  • "Check for updates" action removed from the statusbar widget
  • "Spyder: " text is removed from the statusbar status value. This was used previously as a prefix to the Spyder version that would be displayed when idle. Now that the widget is hidden when idle, "Spyder: " prefix seems unnecessary.
  • Uncaught exceptions in the update worker are sent to the error reporter.
  • version_info now includes pre-release item. To ensure that the development version is greater than the latest release tag, including unstable releases, this field should be used immediately following unstable releases, i.e. returning to work.
  • Local conda channels are remapped to conda-forge when the installer is built. This ensures that the updater correctly identifies Spyder's conda channel.
  • Fixed issue where shortcut name was incorrect when launching after update.
  • Fixed issue where install.bat executes incorrectly because it is over-written during update.

Fixes #21882

Requires conda-forge/spyder-feedstock#167

@mrclary mrclary self-assigned this Feb 27, 2024
@mrclary mrclary marked this pull request as ready for review February 27, 2024 06:26
@ccordoba12 ccordoba12 added this to the v6.0beta1 milestone Feb 27, 2024
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrclary, a couple of small comments for now.

Copy link
Member

@ccordoba12 ccordoba12 left a 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!

spyder/plugins/updatemanager/container.py Outdated Show resolved Hide resolved
spyder/__init__.py Outdated Show resolved Hide resolved
spyder/plugins/updatemanager/container.py Outdated Show resolved Hide resolved
spyder/plugins/updatemanager/plugin.py Outdated Show resolved Hide resolved
spyder/__init__.py Show resolved Hide resolved
spyder/plugins/updatemanager/workers.py Outdated Show resolved Hide resolved
spyder/plugins/updatemanager/workers.py Show resolved Hide resolved
spyder/plugins/updatemanager/workers.py Outdated Show resolved Hide resolved
spyder/plugins/updatemanager/workers.py Outdated Show resolved Hide resolved
spyder/plugins/updatemanager/workers.py Outdated Show resolved Hide resolved
@ccordoba12
Copy link
Member

@mrclary, please rebase to get the fixes to our tests from last week.

@dalthviz, could you review how the update process works with these changes? Thanks!

pyproject.toml Outdated Show resolved Hide resolved
mrclary and others added 17 commits April 15, 2024 22:11
This reverts commit f64ff79, reversing
changes made to 6ecbbae.
I don't think there is a way to remap the local channel to different channels depending on the package, e.g. spyder-kernels to use conda-forge/label/spyder_kernels_rc and spyder to use conda-forge/label/spyder_dev. However, I think conda-forge will be sufficient to allow the updater to perform its actions.
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
…ne if Spyder was still running.

The shortcut no longer uses spyder.exe, but rather pythonw.exe. To positively identify Spyder, we need to expose the WindowTitle using verbosity and searching for "Spyder".
…for Windows, otherwise adverse behavior occurs when executing a file that is being over-written. Copy for macOS and Linux too, just to be safe.
@mrclary
Copy link
Contributor Author

mrclary commented Apr 16, 2024

Okay, I pushed up a fix. I decided to just copy install.[sh|bat] to a temporary directory. This seems to work for Windows now, and while not strictly necessary for macOS and Linux, perhaps an added precaution.

@dalthviz
Copy link
Member

I tested changing the installer Spyder version to 6.0.0a3 and seems like things are working now for that case (I got to 6.0.0a4 without issues) 🎉 However, after uninstalling, reinstalling and setting the Spyder version to 5.5.4, tried to do an update and I got the following warning message:

image

I think this is probably due to not having an alpha release with the new installers naming, right? Checking 6.0.0a4 the installers put the version in the installer name (so instead of Spyder-Windows-x86_64.exe currently the release has Spyder-6.0.0a4-Windows-x86_64.exe). Maybe we should add manually the installers with the expected naming to the 6.0.0a4 GitHub release to test?

Also, kind of out of topic but, while doing the update testing, from time to time I have seen over the Spyder IPython Console a message related with the kernel?

image

@dalthviz
Copy link
Member

Just for testing, I added the expected asset to the 6.0.0a4 release and one thing I noticed is that it seems like the download percentage shown from the status bar is different from the dialog one sometimes 🤔

image

Also, due to the install.log the triggered unistaller showed the reboot screen:

image

Could be possible to set the path where the installer.log is stored by any chance? I think is something nice to have (at least for the installers from PRs and things like that) but is also a little bit annoying since seems like it is shared between installers executions and even accepting to do a reboot doesn't actually remove it (so it needs to be manually removed otherwise you are not able to use again the default spyder-6 directory for the installation for example)

image

image

Also, noticed that the tabs after finishing the update and Spyder opening (Spyder 6.0.0a4) have a weird style 🤔

image

Anyhow, regardless of the above, seems like the update mechanism for a major version update works too 👍

@mrclary
Copy link
Contributor Author

mrclary commented Apr 17, 2024

I tested changing the installer Spyder version to 6.0.0a3 and seems like things are working now for that case (I got to 6.0.0a4 without issues) 🎉 However, after uninstalling, reinstalling and setting the Spyder version to 5.5.4, tried to do an update and I got the following warning message:

I think this is probably due to not having an alpha release with the new installers naming, right? Checking 6.0.0a4 the installers put the version in the installer name (so instead of Spyder-Windows-x86_64.exe currently the release has Spyder-6.0.0a4-Windows-x86_64.exe).

That is correct.

Also, kind of out of topic but, while doing the update testing, from time to time I have seen over the Spyder IPython Console a message related with the kernel?

I have not seen that before. But let's keep an eye on it for alpha-5.

@mrclary
Copy link
Contributor Author

mrclary commented Apr 17, 2024

Just for testing, I added the expected asset to the 6.0.0a4 release and one thing I noticed is that it seems like the download percentage shown from the status bar is different from the dialog one sometimes 🤔

That is strange, since it should be the same exact value fed to both. I wonder if there is a latency in the display of the window causing it to appear to be behind the statusbar.

Also, due to the install.log the triggered unistaller showed the reboot screen:

Could be possible to set the path where the installer.log is stored by any chance?

Unfortunately not. This is fixed by NSIS and not configurable.

I think is something nice to have (at least for the installers from PRs and things like that) but is also a little bit annoying since seems like it is shared between installers executions and even accepting to do a reboot doesn't actually remove it (so it needs to be manually removed otherwise you are not able to use again the default spyder-6 directory for the installation for example)

Yes, it is annoying. This should not be the case, however for the pre-release and releases. The install logging is disabled for these builds.

Also, noticed that the tabs after finishing the update and Spyder opening (Spyder 6.0.0a4) have a weird style 🤔

I have not seen this, but we should monitor it after alpha-5

Anyhow, regardless of the above, seems like the update mechanism for a major version update works too 👍

Great!

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrclary ! 👍

@ccordoba12
Copy link
Member

ccordoba12 commented Apr 17, 2024

Also, noticed that the tabs after finishing the update and Spyder opening (Spyder 6.0.0a4) have a weird style 🤔

This should have been fixed by commit eabb402. At least it's working for me on Linux. But I'll test on Windows and submit a separate PR to fix it if that's not the case.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all your hard work to improve our installers @mrclary!

@ccordoba12 ccordoba12 merged commit 845b331 into spyder-ide:master Apr 18, 2024
23 checks passed
@mrclary mrclary deleted the updater branch April 18, 2024 15:09
@mrclary mrclary mentioned this pull request May 13, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connect errors without specific handling triggered while doing a check for updates to our error report dialog
4 participants