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
When failing to update over HTTPS, let the user update over HTTP #7429
Conversation
Tests are now OK, the failing test is just a random failure: http://builds-artifacts.piwik.org/ui-tests.https-update/10924.7/screenshot-diffs/diffviewer.html |
…ossibility to update over HTTP
Quick note about:
let's leave all "core plugins" screenshot tests in tests/UI/expected-screenshots (eg. in separate repo: https://github.com/piwik/piwik-ui-tests) - if we want to change it, let's open a new issue to discuss - but I suspect the piwik/piwik git repository size increase that would result, would be a blocker to making this change... FYI why it's important:
|
OK will do! |
Very nice to see new UI tests for all these use cases 👍
The screenshot should maybe show the URL it is downloading from (the URL appears blank)
Let's see together the messaging and do small changes Otherwise, looks good! (we will need to test on production by releaseing b4 and then beta5 and testing upgrade from b4 to b5 using this new codebase) |
I've moved the UI tests and the screenshots into the main tests directory (+ submodule).
The URL is blank because the updater is mocked. If I show a URL here it will be a fake one so it could just confuse us in the future if the URL changes, that's why I'd rather leave it that way. |
Final look and messaging looks good to me 👍 https://raw.githubusercontent.com/piwik/piwik-ui-tests/8fe69f4a0708df35348bf701be916ad87d3761e8/CoreUpdaterCode_httpsUpdateFail.png Merging! |
When failing to update over HTTPS, let the user update over HTTP
In #6441 we added support for updating over HTTPS but in some situations this will fail:
In every case except the first one the user has legitimate reasons to ignore the HTTPS error and update via HTTP.
To address that, the user will be shown this screen if downloading the archive over HTTPS fails:
Please note that if the system doesn't support HTTPS downloads, it will use HTTP automatically so this use case is not related to this PR.
Technical details:
tests/UI
to the plugin folderUpdater
class using dependency injectionUpdater
and simulate that 1) there is a new version available, 2) updating over HTTPS fails, 3) updating over HTTP succeedsUpdater
itself is not tested but it wasn't before anyway. To test it I would have to mock many things so I'm not even sure it would be very meaningful. Anyway it's too hard today because there are too many things that are static/not using DI.unrelated but I improved the diffviewer a bit(pushed that to master)FYI looking at the diff commit by commit would probably be easier to read. Also the first commit here belong to #7434, it's better to review it in the separate PR.
TODO before merging:
TODO after merging: