reanahub / reana

REANA: Reusable research data analysis platform
https://docs.reana.io
MIT License
127 stars 54 forks source link

helm: existing image same tag different sha256 #322

Closed diegodelemos closed 4 years ago

diegodelemos commented 4 years ago

Because of re-pushing an image with the same tag, the following problem has happened in a QA deployment (the re-push happens if one follows our current docs and our current practices):

Let us illustrate it with two deployments DEP1 and DEP2:

This will cause DEP2 to not work because:

Solutions

  1. Always increase the lower limit of common packages (reana-db, reana-commons etc..), therefore the tag will change (in our example from 0.6.0-36-gb702986 to 0.6.0-37-gc16d3332).
    • Important: This will, probably, be always necessary because re-pushing the image won't be safe if the previous sha256 aaabbb is used in production and a re-location of the pod from one node to another one triggers a new docker pull, causing production to run all of a sudden bbbccc which might break it.
  2. Use ImagePullPolicy: Always for infrastructure pods.
  3. ...

Note: Even though closely related to https://github.com/reanahub/reana/issues/248 this issue is different since it deals with infrastructure pods (RS, RWC) rather than with runtime pods.

tiborsimko commented 4 years ago

I would prefer 1 over 2. However, we can tackle this problem together with another one: if we rebuild say REANA 0.6.0 two moths after release, the produced docker images are not the same anymore, because we are using relax version constraints like:

$ grep tablib setup.py
    'tablib>=0.12.1,<0.13', 

which can produce images once with tablib 0.12.3, once with 0.12.8, based on which version is available.

This is not good for reproducibility :wink: and we are loosing a lot of time hunting dependencies.

Hence proposal:

WDYT?

tiborsimko commented 4 years ago

For illustration, here is a list of things to do for a cluster package such as reana-workflow-controller in order to move to a pip-compile-based release model:

tiborsimko commented 4 years ago

All REANA cluster components have been moved to use the new pip-compile based freezing.

All REANA client and shared components will remain non-freezed so that users can install them on a variety of existing systems, perhaps into their existing environments.

This issue can therefore be closed.