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

NEVER use lastest tag #179

Closed
unkcpz opened this issue May 17, 2023 · 15 comments · Fixed by #184
Closed

NEVER use lastest tag #179

unkcpz opened this issue May 17, 2023 · 15 comments · Fixed by #184

Comments

@unkcpz
Copy link
Member

unkcpz commented May 17, 2023

This is one thing I got from JupyterCon23 from the talk of https://github.com/yuvipanda who is one of core developers for jupyter docker-stack. "Never use latest" is one take-home message.
I can also find some relevant articles about it:

We actually encounter the issue when using it as the default image in aiidalab-launch, when there is a new release of aiida-core, it uses the new image automatically. This brings the issue that in @superstar54's live demo, not only when starting the container takes time to pull the new image, but also a critical bug happened.

I propose to use latest aiida-core version tag as the default tag of aiidalab-launch profile.
@yakutovicha @superstar54 @danielhollas comments?

@danielhollas
Copy link
Contributor

I don't find the two linked articles that convincing in our use case, since we build and push images on the CI, and the latest tag therefore essentially means "the latest official version".

This brings the issue that in @superstar54's live demo, not only when starting the container takes time to pull the new image, but also a critical bug happened.

Could you please describe exactly what happened? What was the bug? To me, this is more of an issue that we need to test more the official released versions (and perhaps release them less often).

I propose to use latest aiida-core version tag as the default tag of aiidalab-launch profile.

I am not sure I understand your proposal here. The latest tag is equivalent to the latest aiida-core tag. They only start to differ when we bump the aiida-core version. What aiida-core version would you propose to be the default? And how often should the default be updated?

What would make more sense to me is to use the postgres version tag as the default, since supposedly, since updating PSQL is something that the user would typically want to avoid.

What I think is the bigger underlying issue is that in aiidalab-docker-stack the images are based on the latest jupyter-stack image, that is updated very often and often breaks us in unexpected ways (see many recent PRs where we needed to pin versions of various jupyter packages). Specifically, we're tracking Python3.9 tag, which is still updated regularly by the jupyter team. It would be more sane for us to track a tag that is not actively updated (e.g. some older Python version), and only update it e.g. once per six months or something. WDYT?

@danielhollas
Copy link
Contributor

danielhollas commented May 18, 2023

What I think is the bigger underlying issue is that in aiidalab-docker-stack the images are based on the latest jupyter-stack image, that is updated very often and often breaks us in unexpected ways (see many recent PRs where we needed to pin versions of various jupyter packages). Specifically, we're tracking Python3.9 tag, which is still updated regularly by the jupyter team. It would be more sane for us to track a tag that is not actively updated (e.g. some older Python version), and only update it e.g. once per six months or something. WDYT?

Hmm, looks like the above is not quite true, the last release of jupyter/minimal-notebook:python-3.19 was 7 months ago.
https://hub.docker.com/r/jupyter/minimal-notebook/tags?page=1&name=python-3.9.13

So I am not sure where for example issue from aiidalab/aiidalab-home#149 came from.

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

This brings the issue that in @superstar54's live demo, not only when starting the container takes time to pull the new image, but also a critical bug happened.

Could you please describe exactly what happened? What was the bug? To me, this is more of an issue that we need to test more the official released versions (and perhaps release them less often).

I was wrong about this, I thought aiida-2.3.0 is already released and full-stack:latest uses aiida-core==2.3.0. The issue I mentioned is after the container stopped it cannot start because the verdi daemon stop will throw the exception, as also reported by Carlo in the arm64 test and discussed in aiidalab/aiidalab-docker-stack#379.
@superstar54 show me the aiida-core version inside the container was 2.3.0 so it was the same issue but aiida-core is update not because of using a new docker stack but must be somewhere else. @superstar54 do you remember if you reinstall your customized QEapp or re-installed the AWB before you saw the issue?

But I still think using latest tag is not encouraged, it is true the aiida-2.2.2 is equal to latest but afterall the latest is less static than using aiida tag.

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

So I am not sure where for example issue from aiidalab/aiidalab-home#149 came from.

It does not come from the docker stack image but installing aiidalab-home will install the new widgetsnbextension (as the dependency of ipywidget). So we pinned the version inside aiidalab-home

@superstar54
Copy link
Member

I got the error (Critical: The daemon could not be reached, ...) when I restart my computer.

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

Thanks @superstar54. Yes, that is exactly the issue as reported aiidalab/aiidalab-docker-stack#379. Do you know why you have aiida-core==2.3.0 rather than v2.2.2 which is provided by the container? You installed it explicitly or it is updated by other packages (for example if you pin aiida-quantumespresso==4.3.0 it pines aiida-core to v2.3.0).

@superstar54
Copy link
Member

The original version is v2.2.2. I didn't upgrade it manually. Other packages should update it.

@danielhollas
Copy link
Contributor

danielhollas commented May 19, 2023 via email

@superstar54
Copy link
Member

Aiida-core cannot be updated, it is pinned in the image. So I would think you were not using the latest tag.

I used a customized image, which uses FROM aiidalab/full-stack:aiida-2.2.2

@danielhollas
Copy link
Contributor

I got the error (Critical: The daemon could not be reached, ...) when I restart my computer.

How exactly did you get this error? (i.e. which commands exactly and where do you see the error?) Daemon cannot be reached is a very general error, it could have been something else.

I used a customized image, which uses FROM aiidalab/full-stack:aiida-2.2.2

In that case I really don't understand how you could get to aiida-core 2.3.0. We don't have anything imo that would require this version, so unless you went to great lengths to reinstall it, I am puzzled as you could get it to you image.

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

Aiida-core cannot be updated, it is pinned in the image.

Not fully true, I just check the constrain set in docker stack and it is pinned to a range https://github.com/aiidalab/aiidalab-docker-stack/blob/5a1de2efdf86aab6ab2153eebf9cc728f31d9e68/stack/base/requirements.txt#L1

As for the version constrain set in aiidalab by "core-packages", first of all, it will check only through app manager. Meanwhile, there is still way to override the these core-packages by not pinning the aiida-core but having dependencies to install the incompatible version of aiida-core, I guess in @superstar54's case, he install QeApp or aiida-quantumespresso==4.3.0 (either through pip or aiidalab insntall or app manager) and it will then override the aiida-core version to 2.3.0.

I don't know the better solution for it, the dilemma happened to this case is app and package break the container which we didn't consider. Maybe we need to pinning aiida-core version in https://github.com/aiidalab/aiidalab-docker-stack/blob/5a1de2efdf86aab6ab2153eebf9cc728f31d9e68/stack/base/requirements.txt#L1?

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

In that case I really don't understand how you could get to aiida-core 2.3.0.

I just tested, I use full-stack:latest and install aiidalab-qe==23.10.0a0 from app store, the aiida-core==2.3.0 is installed.

@danielhollas
Copy link
Contributor

danielhollas commented May 19, 2023

Not fully true, I just check the constrain set in docker stack and it is pinned to a range https://github.com/aiidalab/aiidalab-docker-stack/blob/5a1de2efdf86aab6ab2153eebf9cc728f31d9e68/stack/base/requirements.txt#L1

I see, you are correct, apologies.

I just tested, I use full-stack:latest and install aiidalab-qe==23.10.0a0 from app store, the aiida-core==2.3.0 is installed.

How exactly did you install it? Also, what is the pip version?

It is still weird that the version got updated, because qeapp requires aiida-core~=2.2, and so it should be satisfied by the already installed aiida-core version, unless you instruct pip to upgrade all packages in the installation process.

In other words, we should find out what triggered the aiida-core reinstallation, and how to possibly avoid it.

@unkcpz
Copy link
Member Author

unkcpz commented May 19, 2023

It is still weird that the version got updated, because qeapp requires aiida-core~=2.2

Nope, aiidalab-qe==23.10.0a0 -> aiida-quantumespresso==4.3.0 -> aiida-core==2.3.0.

How exactly did you install it? Also, what is the pip version?

I installed it from app store, just tick the include pre-release box.

@danielhollas
Copy link
Contributor

Ah, I see, in that case there's really nothing we could do in the docker stack (except if we exactly pin aiida-core version, but that seems problematic).

unkcpz added a commit that referenced this issue Jul 5, 2023
fixes #179

The pull option was set as the default that will cause to download the latest version when it is available, which is not desired as discussed in #179. In most cases, users want to keep on using the image they pulled in the first place. The new version of image download has better happened when explicitly triggered by setting pull.

This commit first makes --no-pull the default of --pull/no-pull option. The pull logic tweaks a bit so that when the image does not exist, it will anyway trigger the pull. If the image exists, the --pull needs to be set to trigger the pull.
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.

3 participants