-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Prevent Che start if 'nightly' or 'latest' images are not current. #3640
Comments
@benoitf @skabashnyuk @garagatyi @riuvshin - I think I have found a way that we can solve the nightly image problem. While we would need to do something like this in the CLI - a similar sort of background thread inside of Che may be needed for things like stack images and workspace images so that we build a continuous database of information about image tags, dates images were written to disk, and then using that information to make smart notifications for end users about whether they need to create a new workspace or not. |
Can you elaborate, I didn't take that. Here are couple of notes to proposed solution:
Here an alternative idea. What do you think if we use CLI digest as init and server tags? In that case CLI will be able to use only matching images of init , server, etc. |
Ok - I was not aware of the concept of digests. Upon reading about them this is absolutely the best solution for us. This requires us to redo how our ci systems work as we are generating the image registry only with image name and tag. We would need that registry to include the digests too. And we should do this for all images not just nightly. You are correct that the --pull would never be needed again. |
@riuvshin - in reading online about the issues with pulling in various tags, I am now concerned that this sort of tag issue could be a hidden disaster, and so treating this as an enhancement, a bug, and a blocker. We will probably need to do a 5.0.1 release that updates a few things. Documentation on how to use digests: So instead of
|
@TylerJewell CI can't get digest and push changes to git repo, CI can only pull & build. |
Also that means that CI system will need do regular commits to repositories for nightly, that is not acceptable. |
My proposal is to add cli image to |
Yes, it is not good way to commit by CI on each build. |
Ok, I agree that the CI approach seems like it introduces more cost than profit. I don't think the What we could do:
|
Merged to master. |
The
nightly
andlatest
images are convenience images desigend to make lives of Che developers easier. However, there are circumstances where changes to the corenightly
image for the CLI requires that all of the underlying dependency images are updated with it. Getting the most recent CLI nightly, but leaving theeclipse/che-init:nightly
oreclipse/che-server:nightly
as older versions can cause problems.A savvy developer can use
--pull
or--force
to forcibly clean this up, but when the errors occur it is not obvious that this is the approach to clean things up.We have tried looking at the
created-date
within the local image cached on a computer with the matching parameter on DockerHub to see if there is a difference. However, the property from dockerhub only reflects when the image was uploaded and does not match the property on the local image, so these values cannot be used for a meaningful comparison.In doing some tests, it is possible from within the CLI of a Docker container, to check the current date and compare it to the date that certain images were written to disk. We could therefore implement some logic such as:
Get the current date of the Docker engine host (Docker VMs can have dates not matching host). On Windows, while today is January 6th, my HyperV VM has the date as December 26th, so we will need to baseline dates.
Get the date that the eclipse/che-cli:nightly image was written to disk.
If the date the image is written to disk is >24 hours, then we should display the warning message.
We could then get the list of dependency images that Che requires (after its been loaded) and then perform a similar check for each one of those. If the dependency images were written to disk >24 hours, we could then detect that other images are older, would they like us to assert a
--force
where wermi
andpull
the image to guarantee it is current.Another variation of this is that any time you run a
nightly
orlatest
image we could display a table to stdout that shows all of the images loaded by Che, their name, and how many days it has been since they were written to disk with a hint that--force
will repull all images. So this way any time a developer sees that some of their images are >1 day old, they know that any issues could just require a repull.The text was updated successfully, but these errors were encountered: