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

Warn if the settings in the workflow are from higher versions #67

Open
markotoplak opened this issue May 21, 2020 · 3 comments
Open

Warn if the settings in the workflow are from higher versions #67

markotoplak opened this issue May 21, 2020 · 3 comments

Comments

@markotoplak
Copy link
Member

If we open some newer workflow on old Orange, the results are undefined. It could work, it might crash, or it could load but not work properly (forgets some settings).

On loading settings we should confirm that the setting version of the available widget is higher or equal to the saved setting version. If not, we should warn the user, and (if possible) show what to update (core orange or a specific add-on).

What to do after the warning? I do not know. I suggest we still try to use the settings as they are. If it crashes, well, fine, there was a warning.

@markotoplak
Copy link
Member Author

We are, as developers, more often that not running a newest version of Orange, so we do not see those problems that often. But our users are not, so we could easily underestimate the importance of this issue.

These warnings may be quite important.

Not everyone likes to update so often.
-- Someone running OS X 10.14, Ubuntu 18.04, and Android 4.4, who finally upgraded to Python 3.7 recently.

@janezd
Copy link
Contributor

janezd commented Nov 13, 2020

The check is trivial

  • either orangewidget.widget.OWBaseWidget.migrate_settings and orangewidget.widget.OWBaseWidget.migrate_context throw an exception (to whom?) if the settings' version is too high,
  • or orangewidget.settings.SettingHandler._migrate_settings and orangewidget.settings.SettingHandler._migrate_contexts compare versions (and do what?).

The former is more appropirate, the latter is safer, because current migration methods on widget never call the base class method. In either case, the latter two methods must then remove the settings/context, as if IncompatibleContext was raised.

I can do the above. But my knowledge of canvas is rather limited, and I don't know what would be a good way of communicating this to canvas, so it can show a dialog that some settings were removed.

With this, I'm unassigning myself, hoping that @ales-erjavec or @irgolic will take over.

@janezd janezd removed their assignment Nov 13, 2020
@markotoplak markotoplak changed the title Warn if the settings in the workflow are higher than those available Warn if the settings in the workflow are from higher versions Jul 6, 2021
@janezd
Copy link
Contributor

janezd commented Jul 6, 2021

This issue says we should check settings versions. On Slack we also discussed workflows. We could add checks for earlier and later versions and write something like:

  • This workflow was created in Orange 3.26; you have 3.29. This is usually not a problem, but it cannot hurt to check that everything works.
  • This workflow was created in Orange 3.29; you have 3.26. This usually fails. We recommend updating Orange.

In the latter case, the message appears only if there are no conflicting migrations discussed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants