From 350d307716b7e998e15e8f393cea294c0dc1a82f Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 10 Jul 2023 15:22:06 +0200 Subject: [PATCH 1/7] Bump aiida-core to v2.4.0 --- build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.json b/build.json index 0a62732d..e967ba32 100644 --- a/build.json +++ b/build.json @@ -7,7 +7,7 @@ "default": "15" }, "AIIDA_VERSION": { - "default": "2.3.1" + "default": "2.4.0" }, "AIIDALAB_VERSION": { "default": "23.03.0" From eba3da28f669e576b8ccd502a4a54fe1c3796ffe Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sat, 21 Oct 2023 18:26:15 +0200 Subject: [PATCH 2/7] test push testing failed image to ghcr --- .../workflows/docker-build-test-upload.yml | 2 ++ .github/workflows/docker.yml | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-upload.yml b/.github/workflows/docker-build-test-upload.yml index 15ed6d04..68de9054 100644 --- a/.github/workflows/docker-build-test-upload.yml +++ b/.github/workflows/docker-build-test-upload.yml @@ -60,6 +60,7 @@ jobs: mkdir -p /tmp/aiidalab/ docker save ${{ env.OWNER }}/${{ inputs.image }} -o /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar shell: bash + if: always() - name: Upload image as artifact 💾 uses: actions/upload-artifact@v3 @@ -67,3 +68,4 @@ jobs: name: ${{ inputs.image }}-${{ inputs.architecture }} path: /tmp/aiidalab/${{ inputs.image }}-${{ inputs.architecture }}.tar retention-days: 3 + if: always() diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1e710f5d..4215d2ad 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -88,7 +88,8 @@ jobs: image: full-stack architecture: amd64 runsOn: ubuntu-latest - needs: [amd64-base-with-services, amd64-lab] + # XXX: for test, will not need to wait. + # needs: [amd64-base-with-services, amd64-lab] arm64-base: uses: ./.github/workflows/docker-build-test-upload.yml @@ -121,6 +122,22 @@ jobs: runsOn: ARM64 needs: [arm64-base-with-services, arm64-lab] + # for test + amd64-fs-push-ghcr: + if: always() # XXX: and build is successful, how? + uses: ./.github/workflows/docker-push.yml + strategy: + matrix: + image: ["full-stack"] + with: + architecture: amd64 + image: ${{ matrix.image }} + registry: ghcr.io + secrets: + REGISTRY_USERNAME: ${{ github.actor }} + REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} + needs: [amd64-full-stack] + amd64-push-ghcr: uses: ./.github/workflows/docker-push.yml strategy: From 08a0d7dd4d33db2957465c83b16d7b37bc63e7ef Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sun, 22 Oct 2023 23:08:19 +0200 Subject: [PATCH 3/7] lower bound of aiida-core --- stack/base/Dockerfile | 13 +++++++------ stack/base/requirements.txt | 2 -- tests/test-full-stack.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) delete mode 100644 stack/base/requirements.txt diff --git a/stack/base/Dockerfile b/stack/base/Dockerfile index 52f77503..3d128203 100644 --- a/stack/base/Dockerfile +++ b/stack/base/Dockerfile @@ -16,20 +16,21 @@ WORKDIR /opt/ ARG AIIDA_VERSION +# Pin shared requirements in the base environemnt. +# The lower bound of aiida-core is set to the version of aiida-core to prevent +# lower aiida-core DB version installed and trigger database downgrade. +RUN echo "pip==23.0.1" > /opt/requirements.txt && \ + echo "aiida-core>=${AIIDA_VERSION},<3" >> /opt/requirements.txt + # Install the shared requirements. -COPY requirements.txt . RUN mamba install --yes \ aiida-core=${AIIDA_VERSION} \ mamba-bash-completion \ - --file requirements.txt \ + --file /opt/requirements.txt \ && mamba clean --all -f -y && \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" - -# Pin shared requirements in the base environemnt. -RUN cat requirements.txt | xargs -I{} conda config --system --add pinned_packages {} - # Configure pip to use requirements file as constraints file. ENV PIP_CONSTRAINT=/opt/requirements.txt diff --git a/stack/base/requirements.txt b/stack/base/requirements.txt deleted file mode 100644 index 7db11bce..00000000 --- a/stack/base/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -aiida-core>=2.0.0,<3,!=2.3.0 -pip==23.0.1 diff --git a/tests/test-full-stack.py b/tests/test-full-stack.py index a0d7f828..55ad4a9c 100644 --- a/tests/test-full-stack.py +++ b/tests/test-full-stack.py @@ -5,7 +5,7 @@ def generate_aiidalab_install_output(aiidalab_exec, nb_user): def _generate_aiidalab_install_output(package_name): output = ( - aiidalab_exec(f"aiidalab install --yes {package_name}", user=nb_user) + aiidalab_exec(f"aiidalab install --yes --pre {package_name}", user=nb_user) .decode() .strip() ) From 75045b54e934935da66fc95cff27f857a9787bb6 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Sun, 22 Oct 2023 23:48:45 +0200 Subject: [PATCH 4/7] Revert CI docker for test changes --- .github/workflows/docker.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4215d2ad..a7599294 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -88,8 +88,7 @@ jobs: image: full-stack architecture: amd64 runsOn: ubuntu-latest - # XXX: for test, will not need to wait. - # needs: [amd64-base-with-services, amd64-lab] + needs: [amd64-base-with-services, amd64-lab] arm64-base: uses: ./.github/workflows/docker-build-test-upload.yml @@ -122,23 +121,8 @@ jobs: runsOn: ARM64 needs: [arm64-base-with-services, arm64-lab] - # for test - amd64-fs-push-ghcr: - if: always() # XXX: and build is successful, how? - uses: ./.github/workflows/docker-push.yml - strategy: - matrix: - image: ["full-stack"] - with: - architecture: amd64 - image: ${{ matrix.image }} - registry: ghcr.io - secrets: - REGISTRY_USERNAME: ${{ github.actor }} - REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} - needs: [amd64-full-stack] - amd64-push-ghcr: + if: always() uses: ./.github/workflows/docker-push.yml strategy: matrix: @@ -153,6 +137,7 @@ jobs: needs: [amd64-base, amd64-base-with-services, amd64-lab, amd64-full-stack] arm64-push-ghcr: + if: always() uses: ./.github/workflows/docker-push.yml strategy: matrix: @@ -167,6 +152,7 @@ jobs: needs: [arm64-base, arm64-base-with-services, arm64-lab, arm64-full-stack] merge-tags-ghcr: + if: always() uses: ./.github/workflows/docker-merge-tags.yml strategy: matrix: From 2518fc0d2d9113a314db622cc874c8e10e26c2a8 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 23 Oct 2023 12:56:04 +0200 Subject: [PATCH 5/7] f-da --- stack/base/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stack/base/Dockerfile b/stack/base/Dockerfile index 3d128203..af2b3cbe 100644 --- a/stack/base/Dockerfile +++ b/stack/base/Dockerfile @@ -22,6 +22,9 @@ ARG AIIDA_VERSION RUN echo "pip==23.0.1" > /opt/requirements.txt && \ echo "aiida-core>=${AIIDA_VERSION},<3" >> /opt/requirements.txt +# Pin shared requirements in the base environemnt. +RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {} + # Install the shared requirements. RUN mamba install --yes \ aiida-core=${AIIDA_VERSION} \ From 5ff2408bb3d88351fdb4fd3d371b1494ba891d70 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 23 Oct 2023 12:58:01 +0200 Subject: [PATCH 6/7] bump pip to latest v23.3.1 --- stack/base/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stack/base/Dockerfile b/stack/base/Dockerfile index af2b3cbe..e26421c2 100644 --- a/stack/base/Dockerfile +++ b/stack/base/Dockerfile @@ -19,12 +19,9 @@ ARG AIIDA_VERSION # Pin shared requirements in the base environemnt. # The lower bound of aiida-core is set to the version of aiida-core to prevent # lower aiida-core DB version installed and trigger database downgrade. -RUN echo "pip==23.0.1" > /opt/requirements.txt && \ +RUN echo "pip==23.3.1" > /opt/requirements.txt && \ echo "aiida-core>=${AIIDA_VERSION},<3" >> /opt/requirements.txt -# Pin shared requirements in the base environemnt. -RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {} - # Install the shared requirements. RUN mamba install --yes \ aiida-core=${AIIDA_VERSION} \ @@ -34,6 +31,9 @@ RUN mamba install --yes \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" +# Pin shared requirements in the base environemnt. +RUN cat /opt/requirements.txt | xargs -I{} conda config --system --add pinned_packages {} + # Configure pip to use requirements file as constraints file. ENV PIP_CONSTRAINT=/opt/requirements.txt From 9d304156482d2cf3f22e6714665efd5a466aa7e5 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Mon, 23 Oct 2023 16:29:56 +0200 Subject: [PATCH 7/7] bump aiidalab to v23.3.2 --- build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.json b/build.json index 35d4ffce..ee04e8f6 100644 --- a/build.json +++ b/build.json @@ -10,7 +10,7 @@ "default": "2.4.0" }, "AIIDALAB_VERSION": { - "default": "23.03.0" + "default": "23.03.2" }, "AIIDALAB_HOME_VERSION": { "default": "23.03.1"