Commit graph

44 commits

Author SHA1 Message Date
geoporalis
ed82488c5b typo fixed
(cherry picked from commit 4e91284)
2016-02-10 10:15:41 +01:00
Gina Häußge
c53c263805 Merge branch 'fix/includeReleasenotesInUpdateNotifications' into maintenance
Conflicts:
	src/octoprint/plugins/softwareupdate/__init__.py
	src/octoprint/static/css/octoprint.css
2016-02-02 20:23:02 +01:00
Gina Häußge
7fcd04ae61 Also use pre-calculated revision information instead of fetching anew 2015-12-14 10:16:29 +01:00
Gina Häußge
1a4920fc36 Display remote version in update message, not local one... 2015-12-10 17:12:02 +01:00
Gina Häußge
8149a3b4a8 Include release notes in update notification
... and confirmation dialog and settings dialog.

github_release fetches release notes link from github. Check configurations
can always set individual release notes links via the new `release_notes`
property. The URL also supports placeholders `{octoprint_version}`,
`{target_version}` and `{target_name}`. A custom release note URL
hence could be configured by a plugin via

    def get_update_information(self):
        return dict(
            myplugin=dict(
                [...]
                release_notes="https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_{target_version}"
                [...]
            )
        )

and if a new release "1.3.4" was now to be released would be displayed to the user as

    https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_1.3.4

The same of course is possible via config.yaml:

    plugins:
      softwareupdate:
        checks:
          myplugin:
            release_notes: 'https://me.github.io/MyPlugin/my/custom/releasenotes.html#version_{target_version}'
2015-12-10 14:41:46 +01:00
Salandora
e8bd29ef99 Replace get_versions() calls with octoprint.server.VERSION, to get some time improvment 2015-12-09 10:29:24 +01:00
Gina Häußge
c5bc000b56 Increased timeout for waiting for restart after update
20sec is too little.
2015-12-02 17:12:04 +01:00
Gina Häußge
612005c4f6 Fixed a bug preventing OctoPrint from updating via github releases
Noticed while testing update path from 1.2.7 to 1.2.8

*bangs her head against a wall*
2015-12-02 09:25:15 +01:00
Gina Häußge
c932e496fa SWU: Show reload dialog after update
The notification and the (forced) dialog afterwards were way too
redundant.
2015-10-08 17:08:36 +02:00
Gina Häußge
25a4d4b79b SWU: Track check origins, ignore if from unavailable plugin
There was a problem with software update checks configurations stored in
config.yaml for which the providing plugin was then removed, since those
check definitions then lacked their default values to be merged on whatever
was stored in config.yaml, causing incomplete check configurations as a
consequence over which the plugin tripped.

This patch fixes that in that it tracks which check config keys are provided
by plugins and only returns those as the active check configurations that
belong to plugins that are still in the system.

TODO: This is only half of the solution. Check configurations of plugins
that are being uninstalled should be removed from the config if the
user decides to remove any settings by the plugin too. We need some
adjustments in the lifecycle tracking in order to make this possible
however, so for now this must suffice to at least prevent any errors from
occuring when incomplete configs are encountered.
(cherry picked from commit 8af8b8f)
2015-09-21 16:46:44 +02:00
Gina Häußge
43ca4d8252 SWU: Do not overwrite check information again
Current version information of OctoPrint from a check definition
could be overwritten for checks under certain circumstances.
2015-09-21 16:42:11 +02:00
Gina Häußge
b56ba6589c Ignore update definitions that are lacking the type
Caused a KeyError so far, update definitions that are broken like that
will now just be ignored instead.

Closes #1057
(cherry picked from commit 2efc5c4)
2015-09-11 08:36:02 +02:00
Gina Häußge
13d7d5f2f6 SWU: Various improvements for better usability
* Allow configuration of checkout folder and version tracking type
    via Plugin Configuration
  * Display message to use if checkout folder is not configured or a
    non-release version is running and version tracking against releases
    is enabled
  * Clear version cache when a change in the check configuration is
    detected
  * Mark check configurations for which an update is not possible with
    a little exclamation mark
(cherry picked from commit 8666a28)
2015-08-26 16:03:11 +02:00
Gina Häußge
bf049ddee4 Fixed two swapped vars
(cherry picked from commit 14c1069)
2015-08-26 15:56:50 +02:00
Gina Häußge
93763a5563 Remove left over observables that are no longer needed
(cherry picked from commit 7986a2f)
2015-08-26 15:56:09 +02:00
Gina Häußge
7a74f5348d Only migrate server commands when not already set
Also migrate for any config version < 4 (incl. None) and make sure
the other migrations may happen on top of that if necessary. Added
some comments to explain necessary migrations.
(cherry picked from commit f1075f6)
2015-08-26 15:55:32 +02:00
Nicanor Romero Venier
57161dd9c3 Added migration step for new settings.
(cherry picked from commit 1cdd61f)
2015-08-26 15:54:17 +02:00
Gina Häußge
54bd7766b9 SWU: Don't use display versions for "current" in github_commit configs
(cherry picked from commit 58c6abc)
2015-08-24 14:51:25 +02:00
Gina Häußge
6df57bc1d1 Evaluate return code of pip while updating
Should not report a successful update anymore when the pip call failes for whatever reason.
(cherry picked from commit 54b981b)
2015-08-11 14:07:38 +02:00
Gina Häußge
4dd4a2cc9c Revert "Remove dependency_links support again"
This reverts commit be423e49fd.

Conflicts:
	src/octoprint/plugins/pluginmanager/__init__.py
	src/octoprint/plugins/softwareupdate/updaters/pip.py
(cherry picked from commit c24ba82)
2015-07-22 19:06:39 +02:00
Gina Häußge
19a5613e59 Made "Software Update" and "CuraEngine" translateable
Also fixed a typo in a notification.
(cherry picked from commit 430e47d)
2015-07-07 18:39:47 +02:00
Gina Häußge
29d49179a9 SWU Fix: properly sanitize version strings for comparison 2015-07-05 10:04:06 +02:00
Gina Häußge
885e6f916c Fix: Don't persists checks when saving SWUpdate settings
(cherry picked from commit 8d10be6)
2015-07-02 15:27:27 +02:00
Gina Häußge
d7a86a4d28 Use UTF-8 for _all_ output from sarge
Lines taking from the asynchronous processing of stdout/stderr where
left as str, leading to encoding problems when utf8 characters showed
up in the stream and were being interpreted as ascii encoding.
(cherry picked from commit 9373be3)
2015-07-02 15:27:17 +02:00
Gina Häußge
7b3e0563cc SWUpdate: Only use version cache from same version of OP
When using the version cache only use the version cache if the OctoPrint
version stored within it matches the one of the currently running
instance. Otherwise we might report false positives with regards to
available updates under some circumstances.
(cherry picked from commit bb7b0cb)
2015-07-02 15:26:02 +02:00
Gina Häußge
e60cdc9d0f Adjusted bundled plugins to new data folder method 2015-06-24 14:33:33 +02:00
Gina Häußge
be423e49fd Remove dependency_links support again
Doesn't work reliably across pip versions, and adding a special rule for each and every version also isn't fun. Plugin authors will need to use a different approach for pulling in dependencies that are not on pypi during install, e.g. extra install urls or something like that. For now, I give up here ;)
2015-06-23 16:22:45 +02:00
Gina Häußge
ac151d9019 Software Update: Use new PipCaller class and only provide dependency-links parameter if supported by pip version 2015-06-23 11:36:41 +02:00
Gina Häußge
e230cfb3f3 Software Update fix: Use pip command line instead of module 2015-06-22 13:07:22 +02:00
Gina Häußge
030b6b4478 Software Update: version cache will be written to disk
Reduces number of requests done against (rate limited) github API, especially after consecutive server restarts. Forcing the update check still will query the API.
2015-06-22 13:05:03 +02:00
Gina Häußge
0f818a313d Software Update: Default to pkg_resources for version comparison
That's also able to cope with 0.3a and similar "non-semantic" version schemes. Semantic version comparison can still be forced by setting the compare_type in the check to "semantic". Strict equality check can be set similarly by using the value "unequal".
2015-06-22 13:03:23 +02:00
Gina Häußge
33ea9c3459 Fix: Software Update config could contain circular reference
Caused by a wrong variable usage. Fixed the usage and added a migration
step that fixes the circular reference if it exists. Bumping configuration
version to 2.

Fixes #946
2015-06-21 12:27:33 +02:00
Gina Häußge
269f18a22f Software Update Fix: Only migrate config settings that are actually in the config 2015-06-19 22:26:22 +02:00
Gina Häußge
dedf3f234f super(...).on_settings_save(data) => octoprint.plugin.SettingsPlugin.on_settings_save(self, data) 2015-06-19 13:19:54 +02:00
Gina Häußge
f1be116190 SoftwareUpdate: Don't persist more check data than necessary in config
The SoftwareUpdate Plugin had a bug that caused way too much check data to be stored in the configuration, leading to plugins potentially being stuck in an "update available" loop although the update had already been applied. Now only the current version of github_commit update types is persisted, not the full check configuration.

Also introduced a configuration version and made the migration function migrate old configs to remove anything that was same as the default supplied for the "octoprint" and all plugin hook checks. That should clean things up in existing installations.
2015-06-19 11:12:24 +02:00
Gina Häußge
a26b203205 Enforce update of updateable software after plugin changes
When any plugins are enabled/disabled, the client now gets a trigger to fetch a fresh list of update information from the server. This should take care of any old popups still hinting at now uninstalled plugins.
2015-06-18 17:08:56 +02:00
Gina Häußge
0d886ab6f1 Revert cbd3b1424b
That was a bit too early and an accident caused by a too fast "OK" in IntelliJ (as quite visible from the completely unrelated commit message)
2015-06-18 12:11:54 +02:00
Gina Häußge
cbd3b1424b Default to full platform compatibility 2015-06-18 12:05:11 +02:00
Gina Häußge
0ce1575e12 Don't allow plugin management while the printer is printing 2015-06-18 11:37:08 +02:00
Gina Häußge
608be52b9a softwareupdate: plugins may now specify that they have dependency links
Update plugin will then also process those during pip install. Was missing previously and caused Pushbullet Plugin to not properly update.
2015-06-13 19:36:28 +02:00
Gina Häußge
5d5c3d74c1 softwareupdate: re-fetch check data on plugin lifecycle events
If plugins get enabled or disabled, the update check configuration needs to be refetched next time it's needed since there might have been changes to plugin implementing the check_info hook.
2015-06-09 19:03:38 +02:00
Gina Häußge
228fb21ceb softwareupdate: Also allow {target} in pip install urls, as a synonym for {target_version} 2015-06-09 17:33:41 +02:00
Gina Häußge
51cc994610 softwareupdate: Slight rewording of "current versions" information 2015-06-09 14:59:52 +02:00
Gina Häußge
2e6240a910 Bundled Software Update Plugin 2015-06-09 13:35:03 +02:00