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

Allow building an Endless Key home directory #117

Closed
dbnicholson opened this issue Aug 18, 2023 · 43 comments
Closed

Allow building an Endless Key home directory #117

dbnicholson opened this issue Aug 18, 2023 · 43 comments

Comments

@dbnicholson
Copy link
Member

dbnicholson commented Aug 18, 2023

The image builder knows how to create a predefined Kolibri home at /var/lib/kolibri with a selection of content (described somewhere in our wondrous web of INI files). It generates a database file for Kolibri to pick up right where the image builder left off; no database migrations to worry about. We should change a lot of this. First, let's just get it working: where the image builder hard-codes /var/lib/kolibri, we want it to optionally use /var/lib/endless-key.

jprvita added a commit that referenced this issue Aug 21, 2023
We want to be able to ship different content for Kolibri and the Endless
Key app. This commit adds support for installing their content to
independent locations, side-by-side.

#117
jprvita added a commit that referenced this issue Aug 21, 2023
We want to be able to ship different configuration for Kolibri and the
Endless Key app. This commit adds support for installing their
configuration to independent locations, side-by-side.

#117
jprvita added a commit that referenced this issue Aug 21, 2023
We want to be able to ship different configuration for Kolibri and the
Endless Key app. This commit adds support for installing their
configuration to independent locations, side-by-side.

#117
@jprvita
Copy link
Contributor

jprvita commented Aug 21, 2023

I wrote a draft PR based on my initial understanding of the task description. But looking back at the project description and UX flow, I'm not sure how things are supposed to work: are we going to have a pre-defined list of pre-loaded content written-out in image configuration INI files, or have the user select the starter pack to be downloaded? The flow in the project spec has the starter pack selection screen, but isn't part of the idea to avoid the initial download for (some of) the Endless OS users?

@dbnicholson
Copy link
Member Author

When I last spoke with @dylanmccall about this, I think the intention was to make the image builder use the content manifest files directly instead of converting to the image builder's INI format. However, I think we can start with the INI format if that's easier.

I could see adding a management command to kolibri-explore-plugin that just does the initial collection download immediately rather than the current method where it's driven by the frontend. Then the image builder configuration would be as simple as specifying the desired content pack. That would take a bit of work in the explore plugin, though.

@jprvita
Copy link
Contributor

jprvita commented Aug 22, 2023

@dbnicholson Thanks, that helps clarify things a bit. However, on the current UX flow, for the English version of the app we're still expecting the user to select a starter pack, which to me seems to indicate that the image builder should not download / pre-load any content for the Endless Key app, since the user will choose it when they first run the app. That said, I don't know how well that model fits with the target audience of Endless OS, so I think we should check with @jofilizola.

With that said, you are right that we can start with pre-loading some content using the image builder configuration INI files, so I'll go ahead and create a test configuration and test my changes, and mark them ready for review once I'm happy with the code.

@dbnicholson
Copy link
Member Author

Oh, I didn't realize the starter pack would be chosen at runtime. I guess one way forward would be preloading the content from all starter packs in the image. A slimmer alternative would be downloading all the channels and all the thumbnails from all the collections. You'd still need to download the actual content at runtime, but you could skip some of the other download steps.

@dbnicholson
Copy link
Member Author

I think we can punt on the content right now. I think the most important things we needed to setup an Endless Key Kolibri homedir are:

  • Enable/disable the proper plugins
  • Download the apps bundle to a well known location
  • Download the collections to a well known location
  • Optionally preseed an options.ini file setting the apps bundle and collections paths rather than relying on environment variables to handle it

That's the bare minimum to have a system managed homedir supporting the explore plugin since it can already handle all the downloading at runtime.

@jprvita
Copy link
Contributor

jprvita commented Aug 22, 2023

I had a quick call with @jofilizola earlier today and she clarified the intended behavior: the plan is to preload all Endless Key content into certain target images. There will still be a selection screen for a start pack (which maybe we should start calling something else), but that selection will only affect what appears in the discovery page. The library will show all the Endless Key content.

jprvita added a commit that referenced this issue Aug 31, 2023
We want to be able to ship different content and configuration for
Kolibri and the Endless Key app. This commit adds support for installing
the content and configuration for each app to separate locations, so
they can be used side-by-side.

#117
jprvita added a commit that referenced this issue Aug 31, 2023
We want to be able to ship different content and configuration for
Kolibri and the Endless Key app. This commit adds support for installing
the content and configuration for each app to separate locations, so
they can be used side-by-side.

#117
jprvita added a commit that referenced this issue Sep 1, 2023
The Endless Key app needs a different set of plugins than traditional
Kolibri.

#117
@jprvita
Copy link
Contributor

jprvita commented Sep 1, 2023

I think we can punt on the content right now. I think the most important things we needed to setup an Endless Key Kolibri homedir are:

  • Enable/disable the proper plugins

I've got the list from https://github.com/endlessm/eos-administration/blob/master/ansible/roles/kolibri/templates/setup-kolibri.sh.j2#L109-L116 minus pwa and kolibri_google_analytics_plugin, which I think are only needed for the online instance -- please correct me if I'm wrong.

  • Download the apps bundle to a well known location
  • Download the collections to a well known location

So essentially the same as what is done in https://github.com/endlessm/eos-administration/blob/master/ansible/roles/kolibri/files/download-apps.sh.

  • Optionally preseed an options.ini file setting the apps bundle and collections paths rather than relying on environment variables to handle it

It looks like these paths already defaults to the right place if the options are not set. See https://github.com/endlessm/kolibri-explore-plugin/blob/master/kolibri_explore_plugin/views.py#L25-L28 and https://github.com/endlessm/kolibri-explore-plugin/blob/master/kolibri_explore_plugin/collectionviews.py#L33-L35

I have some draft code addressing all these points, pending testing.

@jprvita
Copy link
Contributor

jprvita commented Sep 6, 2023

I have a draft PR ready for an initial round of review, however, I'm hitting the following problem when trying to enable kolibri_explore_plugin (full logs):

++ 02:02:02 60-kolibri-content: kolibri plugin enable kolibri_explore_plugin
INFO     Enabling plugin 'kolibri_explore_plugin'
ERROR    Plugin 'kolibri_explore_plugin' exists but does not have an importable kolibri_plugin module
Error: One or more plugins could not be enabled

@dbnicholson
Copy link
Member Author

I have a draft PR ready for an initial round of review, however, I'm hitting the following problem when trying to enable kolibri_explore_plugin (full logs):

++ 02:02:02 60-kolibri-content: kolibri plugin enable kolibri_explore_plugin
INFO     Enabling plugin 'kolibri_explore_plugin'
ERROR    Plugin 'kolibri_explore_plugin' exists but does not have an importable kolibri_plugin module
Error: One or more plugins could not be enabled

I think this is because Kolibri 0.15.7 is being used:

++ 02:01:42 60-kolibri-content: pip install kolibri==0.15.7
Collecting kolibri==0.15.7
  Using cached kolibri-0.15.7-py2.py3-none-any.whl (100.8 MB)
Installing collected packages: kolibri
Successfully installed kolibri-0.15.7

The current explore plugin releases need the 0.16 and the error is because the plugin API changed. You'll have to go the app route and install from a github wheel like https://github.com/learningequality/kolibri/releases/download/v0.16.0-beta5/kolibri-0.16.0b5-py2.py3-none-any.whl.

This might be too messed up to carry on right now. The idea here is that you want to use a Kolibri version less than or equal to the one that will be in the Flatpak. Otherwise you risk running database migrations that code in the flatpak doesn't know about. However, neither the Kolibri flatpak nor the Endless Key flatpak are actually using Kolibri 0.16 yet. See endlessm/endless-key-flatpak#9.

What would be a little more appropriate, particularly since 60-kolibri-content isn't actually doing any caching anymore, is to do all of this using the flatpak itself. However, I don't know if that's feasible in the image builder. You can see how eos-kolibri runs kolibri in the flatpak if you want to give it a try. This would all have to be a chroot hook, though.

@jprvita
Copy link
Contributor

jprvita commented Sep 7, 2023

In that case, I think running the flatpak may be the best approach, especially since we maybe be installing the Kolibri and Endless Key flatpaks side-by-side, and they may be shipping different versions of kolibri.

Let's move this back to the backlog for now and focus on the remaining bits to have the flatpak published. At that point, we can come back to this and try to do the right thing.

jprvita added a commit that referenced this issue Sep 12, 2023
We are going to use the kolibri command from the flatpak app, so we need
to be running from ostree.

#117
@jprvita
Copy link
Contributor

jprvita commented Sep 12, 2023

I got back to this for a bit and wrote the changes to use kolibri from the flatpak, but I'm now hitting an error from libglnx (full logs):

+ '[' org.learningequality.Kolibri == org.learningequality.Kolibri ']'
+ PLUGINS_DISABLE=()
+ PLUGINS_ENABLE=("kolibri.plugins.app" "kolibri_app_desktop_xdg_plugin" "kolibri_desktop_auth_plugin")
+ export KOLIBRI_HOME=/var/lib/kolibri
+ KOLIBRI_HOME=/var/lib/kolibri
+ INSTALL_CHANNELS=("${KOLIBRI_INSTALL_CHANNELS[@]}")
+ KOLIBRI_CMD='flatpak run --no-desktop     --filesystem=/var/lib/kolibri --command=/app/bin/kolibri org.learningequality.Kolibri'
+ for plugin in "${PLUGINS_ENABLE[@]}"
+ flatpak run --no-desktop --filesystem=/var/lib/kolibri --command=/app/bin/kolibri org.learningequality.Kolibri plugin enable kolibri.plugins.app
**
flatpak:ERROR:subprojects/libglnx/glnx-shutil.c:155:mkdir_p_at_internal: assertion failed: (!did_recurse)
Bail out! flatpak:ERROR:subprojects/libglnx/glnx-shutil.c:155:mkdir_p_at_internal: assertion failed: (!did_recurse)
/tmp/60-kolibri-content.chroot: line 98: 24294 Aborted                 ${KOLIBRI_CMD} plugin enable ${plugin}

(I'm running flatpak run as root here to avoid having to deal with creating the kolibri user for now, but I don't think it is affecting the problem I'm seeing here).

@jprvita
Copy link
Contributor

jprvita commented Sep 14, 2023

(I'm running flatpak run as root here to avoid having to deal with creating the kolibri user for now, but I don't think it is affecting the problem I'm seeing here).

The kolibri user in created EOS through a systemd sysusers snippet, and its home directory permissions are adjusted through a systemd tmpfiles snippet, so we don't need to worry about doing that in the image builder -- we can create KOLIBRI_HOME and pre-download channels in the image builder as root, and leave the permissions to be adjusted on first boot (we will need to extend that tmpfiles snippet to cover the Endless Key home too).

jprvita added a commit that referenced this issue Sep 14, 2023
The Endless Key app needs a different set of plugins than traditional
Kolibri.

#117
@jprvita
Copy link
Contributor

jprvita commented Sep 15, 2023

I got back to this for a bit and wrote the changes to use kolibri from the flatpak, but I'm now hitting an error from libglnx (full logs):

+ '[' org.learningequality.Kolibri == org.learningequality.Kolibri ']'
+ PLUGINS_DISABLE=()
+ PLUGINS_ENABLE=("kolibri.plugins.app" "kolibri_app_desktop_xdg_plugin" "kolibri_desktop_auth_plugin")
+ export KOLIBRI_HOME=/var/lib/kolibri
+ KOLIBRI_HOME=/var/lib/kolibri
+ INSTALL_CHANNELS=("${KOLIBRI_INSTALL_CHANNELS[@]}")
+ KOLIBRI_CMD='flatpak run --no-desktop     --filesystem=/var/lib/kolibri --command=/app/bin/kolibri org.learningequality.Kolibri'
+ for plugin in "${PLUGINS_ENABLE[@]}"
+ flatpak run --no-desktop --filesystem=/var/lib/kolibri --command=/app/bin/kolibri org.learningequality.Kolibri plugin enable kolibri.plugins.app
**
flatpak:ERROR:subprojects/libglnx/glnx-shutil.c:155:mkdir_p_at_internal: assertion failed: (!did_recurse)
Bail out! flatpak:ERROR:subprojects/libglnx/glnx-shutil.c:155:mkdir_p_at_internal: assertion failed: (!did_recurse)
/tmp/60-kolibri-content.chroot: line 98: 24294 Aborted                 ${KOLIBRI_CMD} plugin enable ${plugin}

I'm still hitting this error when trying to call kolibri from inside the flatpak. And as we discussed in today's meeting, we don't strictly need to enable the plugins, so I can avoid the previous error I was hitting when trying to enable kolibri-explore-plugin (#117 (comment)) by simply skipping it for now. I believe that is fine and should get us a working KOLIBRI_HOME, so I'll stick with the pip-installed kolibri.

@jprvita
Copy link
Contributor

jprvita commented Sep 15, 2023

I also looked into adjusting the permissions of KOLIBRI_HOME for Endless Key, and found out that it is already addressed by endlessm/eos-kolibri@d9d4419. However, we do not create a separate system user for Endless Key, so its KOLIBRI_HOME will be chown'ed to kolibri:kolibri. I believe that is fine.

jprvita added a commit that referenced this issue Sep 15, 2023
We want to be able to ship different content and configuration for
Kolibri and the Endless Key app. This commit adds support for installing
the content and configuration for each app to separate locations, so
they can be used side-by-side.

#117
jprvita added a commit that referenced this issue Sep 15, 2023
The Endless Key app needs a different set of plugins than traditional
Kolibri.

#117
@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

I believe what I have written now is doing the right thing. In addition to what is described on the last comments above, I'm also allowing the user to specify in the configuration which collections (artist, explorer etc) they want to preload, although I'm not entirely sure if we'll use it or not -- depends on how we end up defining the preloading strategy. I can easily drop that part if we don't want it.

But I am hitting a problem when preloading the content, where importchannel is failing (full logs):

++ 02:19:44 53-ek-content-preload: kolibri manage importchannel network 97111903de564de49483a9705d41a8ac
INFO     Option DEBUG in section [Server] being overridden by environment variable KOLIBRI_DEBUG
INFO     Option DEBUG_LOG_DATABASE in section [Server] being overridden by environment variable KOLIBRI_DEBUG_LOG_DATABASE
INFO     Option CENTRAL_CONTENT_BASE_URL in section [Urls] being overridden by environment variable KOLIBRI_CENTRAL_CONTENT_BASE_URL
WARNING  Neither `ifconfig` (`ifconfig -a`) nor `ip` (`ip address show`) commands are available, listing network interfaces is likely to fail
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
ERROR    /bin/sh: 1: ip: not found

INFO     Importing 'tasks' module from django apps
INFO     Invoking command importchannel network 97111903de564de49483a9705d41a8ac
INFO     Downloading data for channel id 97111903de564de49483a9705d41a8ac
Traceback (most recent call last):
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/base.py", line 1283, in _execute_context
    self.dialect.do_execute(
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

In my tests it always fails on that same channel, 97111903de564de49483a9705d41a8ac.

I've opened a draft PR with my changes.

@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

In my tests it always fails on that same channel, 97111903de564de49483a9705d41a8ac.

Trying with collections that do not include that channel (athlete + spanish) got me to avoid that problem, although the build failed for an unrelated reason (good old partx -a -v /dev/loop0 failed 10 times; giving up).

@dbnicholson
Copy link
Member Author

In my tests it always fails on that same channel, 97111903de564de49483a9705d41a8ac.

I imagine the channel database is corrupted on the content server. Let me take a look.

@dbnicholson
Copy link
Member Author

I deleted the channel on the server, so the next time you run this it should be imported again.

@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

I deleted the channel on the server, so the next time you run this it should be imported again.

Great, thanks! I'll give it a try. That may have happened because I aborted one build while it was running the hook that instructs the server to download some channels, but it is just a guess. Let's see if it builds successfully now.

In any case, I was able to test a build with the athlete + spanish collections, and it looks like things are working.

Screenshot from 2023-09-27 13-31-43

There are a few things we may want to address separately though.

  1. The discovery page is empty.
    Screenshot from 2023-09-27 13-30-50

  2. After running the Endless Key for the first time, desktop lauchers appear for its channels.
    Screenshot from 2023-09-27 13-32-59

  3. Clicking on one of these launchers works, and it gets opened in the Endless Key, except that the window title and icon are set to the channel name and icon. And after clicking on the x inside the application (next to the channel icon), there is a prompt to choose which app to use.
    Screenshot from 2023-09-27 13-41-20
    Screenshot from 2023-09-27 13-41-44

  4. Clicking on one of the Kolibri launchers also opens them in the Endless Key app, which works or not depending on the channel (see below "Cooking" and "Using Studio: Your Content Workspace for Kolibri").
    Screenshot from 2023-09-27 13-44-46
    Screenshot from 2023-09-27 14-17-06

@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

I deleted the channel on the server, so the next time you run this it should be imported again.

Great, thanks! I'll give it a try. That may have happened because I aborted one build while it was running the hook that instructs the server to download some channels, but it is just a guess. Let's see if it builds successfully now.

Same error, with the same channel ID:

�[37mINFO     Invoking command importchannel network 97111903de564de49483a9705d41a8ac�[0m
�[37mINFO     Downloading data for channel id 97111903de564de49483a9705d41a8ac�[0m
Traceback (most recent call last):
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/base.py", line 1283, in _execute_context
    self.dialect.do_execute(
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

I deleted the channel on the server, so the next time you run this it should be imported again.

Great, thanks! I'll give it a try. That may have happened because I aborted one build while it was running the hook that instructs the server to download some channels, but it is just a guess. Let's see if it builds successfully now.

Same error, with the same channel ID:

�[37mINFO     Invoking command importchannel network 97111903de564de49483a9705d41a8ac�[0m
�[37mINFO     Downloading data for channel id 97111903de564de49483a9705d41a8ac�[0m
Traceback (most recent call last):
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/base.py", line 1283, in _execute_context
    self.dialect.do_execute(
  File "/var/cache/eos-image-builder/tmp/kolibri-content-venv/lib/python3.9/site-packages/kolibri/dist/sqlalchemy/engine/default.py", line 590, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

And it looks like the channel was re-imported (other channels just jumped from 0 straight to 100%):

+ 20:44:13 INFO 52-ek-content-cache: Importing channel 97111903de564de49483a9705d41a8ac content
+ 20:44:13 INFO 52-ek-content-cache: Progress: 0%
+ 20:44:17 INFO 52-ek-content-cache: Progress: 5%
+ 20:44:20 INFO 52-ek-content-cache: Progress: 11%
+ 20:44:22 INFO 52-ek-content-cache: Progress: 17%
+ 20:44:23 INFO 52-ek-content-cache: Progress: 21%
+ 20:44:23 INFO 52-ek-content-cache: Progress: 25%
+ 20:44:25 INFO 52-ek-content-cache: Progress: 30%
+ 20:44:26 INFO 52-ek-content-cache: Progress: 35%
+ 20:44:28 INFO 52-ek-content-cache: Progress: 41%
+ 20:44:29 INFO 52-ek-content-cache: Progress: 45%
+ 20:44:30 INFO 52-ek-content-cache: Progress: 50%
+ 20:44:32 INFO 52-ek-content-cache: Progress: 55%
+ 20:44:34 INFO 52-ek-content-cache: Progress: 60%
+ 20:44:35 INFO 52-ek-content-cache: Progress: 65%
+ 20:44:37 INFO 52-ek-content-cache: Progress: 70%
+ 20:44:39 INFO 52-ek-content-cache: Progress: 77%
+ 20:44:40 INFO 52-ek-content-cache: Progress: 80%
+ 20:44:43 INFO 52-ek-content-cache: Progress: 85%
+ 20:44:45 INFO 52-ek-content-cache: Progress: 90%
+ 20:44:46 INFO 52-ek-content-cache: Progress: 97%
+ 20:44:48 INFO 52-ek-content-cache: Progress: 100%

jprvita added a commit that referenced this issue Sep 27, 2023
Instead of loading every channel from every collection JSON from the
Endless Key app, allow the image configuration to list which collections
to include.

#117
jprvita added a commit that referenced this issue Sep 27, 2023
We want to preload the whole Endless Key library in Endless OS images.
We also need to ensure the content is available in our Kolibri cache
server, if we are pulling the content from it.

#117
jprvita added a commit that referenced this issue Sep 27, 2023
Instead of loading every channel from every collection JSON from the
Endless Key app, allow the image configuration to list which collections
to include.

#117
@jprvita
Copy link
Contributor

jprvita commented Sep 27, 2023

I believe the import problem is unrelated to the changes. These hooks are executed unless two things are true: A. org.endlessos.Key is part of the apps list under [flatpak-remote-flathub] in the image configuration; and B. the collections list under [endlesskey] in the image configuration is not empty; so I changed the default so collections is now empty by default. With that, I think this is ready for review + merging, so I'm marking the PR as ready for review.

@dbnicholson
Copy link
Member Author

I built this locally with the artist collection (which contains channel 97111903de564de49483a9705d41a8ac) and wasn't able to reproduce the problem. I also locally imported the channel with both kolibri 0.15.12 and 0.16.0-beta6 and didn't have an issue with either. So, I don't know what's going on there.

One potential issue is that we're doing the installation with 0.15.7, which is very old even for the nearly dead 0.15 series. I'm going to add on a couple commits that:

  • Update the kolibri version to 0.15.12 since org.learningequality.Kolibri has had that for a while.
  • Specifies a separate kolibri version for Endless Key since the Kolibri version there is not connected to the version used in the Kolibri flatpak. I'm going to use 0.16.0-beta6 since that's been in the released Key flatpak.

@dbnicholson
Copy link
Member Author

  1. The discovery page is empty.

We still need to select a content pack so that the tags can be applied at runtime.

endlessm/kolibri-explore-plugin#863

  1. After running the Endless Key for the first time, desktop lauchers appear for its channels.
  2. Clicking on one of these launchers works, and it gets opened in the Endless Key, except that the window title and icon are set to the channel name and icon. And after clicking on the x inside the application (next to the channel icon), there is a prompt to choose which app to use.
  3. Clicking on one of the Kolibri launchers also opens them in the Endless Key app, which works or not depending on the channel (see below "Cooking" and "Using Studio: Your Content Workspace for Kolibri").

The product decision was to disable the generated channel launchers for Endless Key, so these will go away.

endlessm/eos-kolibri#29

@dbnicholson
Copy link
Member Author

I merged #120. @jprvita can you backport this to the eos5.0 branch? Then I guess we need to setup some configuration that actually tries to use it. But I believe we may be blocked on the proper collection to use.

jprvita added a commit that referenced this issue Oct 2, 2023
This will avoid trying to download and install the same channel more
than once.

#117
@jprvita
Copy link
Contributor

jprvita commented Oct 2, 2023

I've created #121 addressing the deduplication of the list of channels to be downloaded. Once that is merged I can test with eos5.0 and backport.

@jprvita
Copy link
Contributor

jprvita commented Oct 2, 2023

  1. Clicking on one of the Kolibri launchers also opens them in the Endless Key app, which works or not depending on the channel (see below "Cooking" and "Using Studio: Your Content Workspace for Kolibri").

The product decision was to disable the generated channel launchers for Endless Key, so these will go away.

endlessm/eos-kolibri#29

Will those changes also prevent number 4 above? Or do we need to remove a mime type handler somewhere else?

@dylanmccall
Copy link
Contributor

  1. Clicking on one of the Kolibri launchers also opens them in the Endless Key app, which works or not depending on the channel (see below "Cooking" and "Using Studio: Your Content Workspace for Kolibri").

The product decision was to disable the generated channel launchers for Endless Key, so these will go away.
endlessm/eos-kolibri#29

Will those changes also prevent number 4 above? Or do we need to remove a mime type handler somewhere else?

Oh, for some reason I thought we'd filed that one away somewhere, but I can't find it. I made a separate ticket for it over here: endlessm/endless-key-flatpak#102. It's a minor fix we need to do in the Endless Key desktop app, independent of ostree stuff.

@dbnicholson
Copy link
Member Author

This work needs to be backported to the eos5.0 branch, although it would be nice to give it a test on master first.

jprvita added a commit that referenced this issue Oct 13, 2023
We want to preload the whole Endless Key library in Endless OS images.
We also need to ensure the content is available in our Kolibri cache
server, if we are pulling the content from it.

#117
jprvita added a commit that referenced this issue Oct 13, 2023
Instead of loading every channel from every collection JSON from the
Endless Key app, allow the image configuration to list which collections
to include.

#117
jprvita added a commit that referenced this issue Oct 13, 2023
This will avoid trying to download and install the same channel more
than once.

#117
@jprvita
Copy link
Contributor

jprvita commented Oct 13, 2023

I have backported this to eos5.0 and tested a 5.0 build. Things seem to be working, but it still tried to "download" content when I selected the Explorer pack (which was already preloaded). However, it was very fast (probably about 1 minute), and looking at the logs it seems only the tagging was happening at that time. It would be nice to fix the UX so it does not look like to the user that there is still some download happening.

Here is the config I used for testing:

[flatpak-remote-flathub]
apps_add =
  org.endlessos.Key

[kolibri]
automatic_provision = true
regular_users_can_manage_content = true
install_channels =
  # Cooking [complete]
  79cd09863eed51e98576c35ede6f9c9d
  # Using Studio: Your Content Workspace for Kolibri [6]
  ec29f4cc20a8437d844a60297c2ffd07

[kolibri-ec29f4cc20a8437d844a60297c2ffd07]
include_node_ids =
  # English [topic]
  8b0c58bf187a4b88ba9bd602302b5736

[endlesskey]
collections =
  artist
  explorer

And here are the logs:
endless-key-import-logs.txt

Since the changes here look correct, I've pushed them to eos5.0.

@erikos
Copy link
Contributor

erikos commented Oct 23, 2023

This is followed-up by endlessm/kolibri-explore-plugin#890

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

Successfully merging a pull request may close this issue.

4 participants