docker-stacks icon indicating copy to clipboard operation
docker-stacks copied to clipboard

Automatically send build times and images size for all PRs

Open mathbunnyru opened this issue 3 years ago • 8 comments

The idea is to be sure, that the image is not building slower than it was and the image size is acceptable.

The idea came from https://github.com/jupyter/docker-stacks/pull/1213

mathbunnyru avatar Jan 15 '21 17:01 mathbunnyru

I'm waiting for your implementation, in the meantime I will do it manually 😭

romainx avatar Jan 15 '21 18:01 romainx

I'm waiting for your implementation, in the meantime I will do it manually 😭

I'll implement it for sure 👍 I think there should be an easy GitHub action to do it.

It'll take some time, because I don't have much free time at the moment, but I will try my best :)

mathbunnyru avatar Jan 15 '21 18:01 mathbunnyru

@mathbunnyru obviously it's not urgent at all. But it could be interesting. For information @parente shared in #693 a notebook performing this kind of comparison https://nbviewer.jupyter.org/gist/parente/316d5c242aeb484484c8 from various tags / date directly from DockerHub.

Jupyter_Notebook_Viewer

romainx avatar Jan 15 '21 18:01 romainx

Thanks for the link!

We can't do this for the image in the PR, because it is not uploaded to dockerhub, but we can fetch the numbers for the current master and do the comparison.

mathbunnyru avatar Jan 15 '21 18:01 mathbunnyru

Hi,

not sure if this is related to this issue here, but I'm struggling to understand which image to pull with the package requirements I want. I thought the image tags were related to the PRs (e.g. this commit would be push to docker hub with tag 35d3fff or something like that). I'm in this situation as I want to pull down an image with Jupyter < 3 so that some extension works (e.g. bokeh).

I know that potentially I could build my own image locally using the recipe in the docs and intalling old version of Jupyter but I thought there was more a neat way to pull down the image I want.

Is this issue addressing partly my problem? Are you intending of pushing tags and dates of build so that can matched with dates of merged PRs?

Thanks. S

srggrs avatar Feb 27 '21 00:02 srggrs

Hi, no, I would say that this is unrelated.

But I will be glad to help you. You probably want the latest version with JupyterLab < 3 (not Jupyter).

So, all you need to do is to find the commit before lab update and use this commit's hash prefix as the tag. Note, that not all commits are tagged, because they might be docs update and do not change the image.

You need approximately this commit (I might be not accurate, because not all commits are built): https://github.com/jupyter/docker-stacks/commit/7e07b801d92b3db6d90010f87b06ec1ab994eef0

And you can search for this commit on dockerhub. https://hub.docker.com/r/jupyter/scipy-notebook/tags?page=1&ordering=last_updated&name=7e07

Note, that tag starts with commit's hash, as I said. And you will find this image: https://hub.docker.com/layers/jupyter/scipy-notebook/7e07b801d92b/images/sha256-a92c7ecfe5331038a513d0a71df0666665d003e04c4ea3ef41cf89ceb89f1f21?context=explore

And, if you want to base your image on something other than scipy-notebook, you can do the same search as I showed you (but on the page of the relevant image).

Hope this helps.

Please, if you want to continue this discussion, create a new issue.

mathbunnyru avatar Feb 27 '21 12:02 mathbunnyru

I found Github Action, which will greatly simplify this task.

https://github.com/marketplace/actions/sticky-pull-request-comment

Create a comment on a pull request, if it exists update that comment.

I think it should be quite simple to check the sizes of the latest master build images, the current PR and so on. I will also think about adding a build time, though it might not be that good (because of network/spikes and so on).

mathbunnyru avatar Jun 20 '21 17:06 mathbunnyru

Also, the build time is written in the Github Action itself, so it might not make sense to duplicate.

Successful in 27m

mathbunnyru avatar Jun 20 '21 17:06 mathbunnyru

Now, we upload our images as GitHub artifacts, so it's relatively easy to see the image size. It's also not difficult to see the time it took to build the image. And after that, we don't add new stuff to the images, so I don't think we really need this feature now.

mathbunnyru avatar Sep 30 '22 09:09 mathbunnyru