offspot / imager-service

Create Kiwix Hotspot microSD cards online
https://imager.kiwix.org/
GNU General Public License v3.0
11 stars 6 forks source link

Don’t schedule recipes if a book is not in the library #242

Closed kelson42 closed 3 years ago

kelson42 commented 3 years ago

Considering that if this is the case the process will die anyway later (see https://github.com/kiwix/kiwix-hotspot/issues/564 or https://github.com/kiwix/kiwix-hotspot/issues/571) better do that earlier and even don’t allow to start by doing a recipe sanity check.

rgaudin commented 3 years ago

We need a clear follow-up path for this. This is a cardshop/kiwix issue.

kelson42 commented 3 years ago

We should not schedule and if there is a notification to the user for the reason, then this is even better.

rgaudin commented 3 years ago

Sorry this is not enough.

I understand that when a user creates an Order, we should check with the library and prevent the order creation if a book is missing. We don't do that currently as we deffer all logic to the installer.

Note that this is still subject to the double-libraries sync issue.

Now, if it is present when ordered but not when starting the process (imagining it stayed in the pipe a bit), my previous question remains identical.

kelson42 commented 3 years ago

Note that this is still subject to the double-libraries sync issue.

What is a "double-libraries sync issue" exactly?

Now, if it is present when ordered but not when starting the process (imagining it stayed in the pipe a bit), my previous question remains identical.

This was the purpose of https://github.com/kiwix/kiwix-hotspot/issues/571. It should be checked very early in the kiwix-hotspot installer and return an error if not available in the library. Gracefully in interactive mode and otherwise this is like any other error, reported to the cardshop which should handle it (report it to the user and inviting him to remove this book from its configuration). Does that answer the question?

rgaudin commented 3 years ago

no, because that's current behavior

kelson42 commented 3 years ago

@rgaudin So why https://github.com/kiwix/kiwix-hotspot/issues/563 happened? Not only the user has not been informed gracefuly, but it errored late in the process at the ZIM download time.

rgaudin commented 3 years ago

Files are présent for that ticket so it's unrelated. Your ticket title is about not scheduling and you are now proposing that the installer checks it (obviously post scheduling), early, which is the current behavior.

Let's discuss all those tickets tom. as the way forward seems easy but this discussion is not

kelson42 commented 3 years ago

@rgaudin thx for your patience and explanations. The ticket is simply invalid IMO.