NRE Labs Community

Curriculum Version in Selfmedicate?

Selfmedicate is meant to be a curriculum development tool. As a result, while we’re using tagged images for all Antidote platform stuff, we’ve been using the latest tags for all curriculum images. This ensures that whoever is working with the environment is using the latest and greatest images that have been built from the curriculum’s master branch.

However, as has been pointed out, this results in fresh downloads being necessary every day (since the latest images are rebuilt nightly), and this can be several GB total. Not ideal in any case, but especially on slower internet connections, this is a huge impediment.

As discussed on this morning’s standup, we could use the SYRINGE_CURRICULUM_VERSION environment variable to pin the curriculum to the current latest version, which at this time is v1.0.0. Images that have been tagged like this don’t change, so they’ll only need to be downloaded once. However, there are a bunch of problems we’d be introducing by doing this:

  • If there are changes to an image that a lesson could/wants to make use of, they’d have to disable this to get at it. Same applies to folks working on images. So this really only solves the problem for folks that definitely don’t need the latest version of an image (which I don’t really want to bother figuring out) and also don’t plan to make image changes themselves. And even then, the murkiness around who’s using what image will become a catastrophic mess.
  • Most folks work on images on their own repositories before opening a PR, and we’d be auto-appending a version to their repo, which they’re almost certainly not going to have.
  • We’d have to update selfmedicate at every curriculum release to reference the newly released version.

Thinking about this again, I realize that I left SYRINGE_CURRICULUM_VERSION out of selfmedicate for a good reason - it actively goes against the mission of selfmedicate, which is to enable curriculum development, which means using the latest version of everything. So I’m :-1: to the idea of adding this. However, we still need to solve the problem.

Maybe we can make the imagepullpolicy a configurable option in Antidote? So it’s downloaded once at selfmedicate initialization, but not after? Users of selfmedicate would still need to make sure they’re pulling the latest version manually when needed, but we can just add this to the docs as part of the process? Idk, I would like to use this thread to discuss this in more detail.

Great points @mierdin. I was thinking about this after the call as well, which is why I did not make the issue request yet. I personally would love to see the pods.go ImagePullPolicy: "Always" made an environment Variable. This could then be changed by the user.

If we decide to preload the images, there would still be changes to pull down, but hopefully it won’t be pulling all of the changes, just part of the docker images.

This is an easy thing to add to Syringe, and I can do that shortly. Hopefully we can get 0.5.0 out early in the year so selfmedicate can reap the benefits.

We also need to accelerate plans to replace the existing vqfx snapshot-based images - having that is a big problem.

FYI, I had a chance to get this done.