settings-view icon indicating copy to clipboard operation
settings-view copied to clipboard

Disable automatic check for updates when "Automatically Update" is disable [WIP]

Open smlz opened this issue 8 years ago • 0 comments

Description of the Change

This change disables the periodic checking for package updates when core.automaticallyUpdate is unset. A warning is displayed to the user in the Updates pane, that no automatic checks for updates are performed. Additionally the message "All of your installed packages are up to date!" is only shown directly after manually triggering the check.

Alternate Designs

Another approach would have been to express the no-check-for-updates-yet-perfomed state explicitly in the PackageManager class and then communicate it to the UI. As a consequence, the usage of the PackageManager would need to be reworked.

Alternatively, only the call sites of PackageManager::getOutdated could be modified, to check core.automaticallyUpdate before calling. There are three such sites within the settings-view package, potentially more in other packages.

I think, the proposed solution is minimally invasive, as the call sites do not need any modification.

Benefits

Up until now, Atom checks at every startup and after that in ten minutes intervals the availability of updates for all installed packages. People with limited mobile plans have complained about these automatic checks (See for example https://discuss.atom.io/t/open-how-to-prevent-atom-to-update-packages-at-each-reload/45638/5 or the mentioned issues).

Even though atom just checks for possible updates, and does not actually download or install them, people seem to expect that no such network traffic is generated when the option "Automatically Update" is disabled.

Possible Drawbacks

When the option core.automaticallyUpdate is disabled, the message "All of your installed packages are up to date!" is only shown directly after the check is performed, and is not shown the next time the pane is accessed. Ideally this message is displayed for the next ten minutes after a successful check.

Applicable Issues

  • atom/atom#15283
  • atom/atom#12524
  • atom/atom#11318
  • atom/atom#7339

TODOs

  • [x] Change behaviour of PackageManager
  • [x] Display warning
  • [x] Hide noUpdatesMessage when appropriate
  • [ ] specs

smlz avatar Oct 04 '17 22:10 smlz