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

[ota]: deprecation check & notice #10639

Merged
merged 3 commits into from Jul 4, 2023
Merged

[ota]: deprecation check & notice #10639

merged 3 commits into from Jul 4, 2023

Conversation

pazos
Copy link
Member

@pazos pazos commented Jul 3, 2023

Poor man implementation since we cannot fullfit #10610 (comment)

EOL devices running the last supported version receive a "you're up to date" while checking updates.
EOL devices on previous versions receive an update to last supported version.

So instead, we merge something like this a few days/weeks before real deprecation and warn users with EOL devices that the source of trust is in https://github.com/koreader/koreader/wiki/deprecated-devices.

Other platforms can implement their own isDeprecated override on the future.

A better approach is very welcome. The same for a future proof client-server implementation.

This one is trivial and tries to prevent some tickets :)

No worries, at some point in 2024 somebody will try to update from v2021.02 and we will get a ticket :p


This change is Reviewable

@pazos pazos marked this pull request as draft July 3, 2023 23:56
@Frenzie
Copy link
Member

Frenzie commented Jul 4, 2023

This seems fine to me.

@NiLuJe
Copy link
Member

NiLuJe commented Jul 4, 2023

Yeah, I can't really think of a way to handle this retro-actively anyway :/.

@pazos
Copy link
Member Author

pazos commented Jul 4, 2023

@NiLuJe @Frenzie do you think it makes sense to do a point release just to nuke otas?

Otherwise people on last supported version can still be able to update to an unsupported APK that will fail to install

@Frenzie
Copy link
Member

Frenzie commented Jul 4, 2023

Yes, I think that's sensible.

@Frenzie Frenzie added this to the 2023.06.1 milestone Jul 4, 2023
@pazos pazos marked this pull request as ready for review July 4, 2023 17:48
@pazos pazos changed the title [RFC][ota]: deprecation check & notice [ota]: deprecation check & notice Jul 4, 2023
@@ -227,6 +229,10 @@ function OTAManager:fetchAndProcessUpdate()
UIManager:show(InfoMessage:new{
text = _("KOReader is up to date."),
})
elseif ota_version == -1 then
UIManager:show(InfoMessage:new{
text = T(_("Device no longer supported.\n\nPlease check %1."), "https://github.com/koreader/koreader/wiki/deprecated-devices")
Copy link
Contributor

Choose a reason for hiding this comment

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

Always bothering to leave a period . at the end of the URL, people typing it with the period will get a 404.

@@ -227,6 +229,10 @@ function OTAManager:fetchAndProcessUpdate()
UIManager:show(InfoMessage:new{
text = _("KOReader is up to date."),
})
elseif ota_version == -1 then
UIManager:show(InfoMessage:new{
text = T(_("Device no longer supported.\n\nPlease check %1"), "https://github.com/koreader/koreader/wiki/deprecated-devices")
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this change to use template is necessarily a good idea, although of course something like the Chinese documentation on the wiki comes with its own set of issues (mainly that I have no idea how out of date it might be :-) ).

Copy link
Member

Choose a reason for hiding this comment

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

Anyway, good to go in my book, please merge today or tomorrow so that there'll be some translations by Saturday.

@pazos pazos added the chore label Jul 4, 2023
@pazos pazos merged commit 5336e2f into koreader:master Jul 4, 2023
3 checks passed
@pazos pazos deleted the deprecated branch July 4, 2023 20:58
@yparitcher
Copy link
Member

No worries, at some point in 2024 somebody will try to update from v2021.02 and we will get a ticket :p

Sorry for only thinking of this after the point release, but we can freeze android-latest-stable etc at 06.1 and change the link format from android to include the min sdk version android-18-latest-stable and have it point to the same files.

The otamanager getotamodel will have to check that the android device is >= the sdk version. (This is similar to our kindle check).

We would only need to change 2 lines in nightswatcher https://github.com/koreader/koreader-misc/blob/d39aa7b834174a99c8821898424bfff1b95607ce/nightswatcher/nightswatcher.py#L192

Therefore any old version will only update using the frozen file until 06.1, and only then will it have code to recognize there are new updates for newer devices. This would require us to keep 06.1 for android around for a while. (Fdroid is aware of sdk versions so we shouldnt have to do anything for it)

This may be too much complexity for little gain, but just putting it out there. Epecialy since i missed the release boat :)

@yparitcher
Copy link
Member

We can also just edit the link_format string which requires no dynamic code, but has the downside of dragging appimage along for no good reason.

Also this would clutter the ota server with an extra ~10 small files for each android deprecation

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

Successfully merging this pull request may close these issues.

None yet

5 participants