reanahub / reana

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

feat(reana_dev): add no_update_submodules flag (#816) #816

Closed jlemesh closed 1 month ago

jlemesh commented 1 month ago

Add --no-update-submodules flag to reana-dev commands cluster-build and cluster-deploy.

reana-commons adage lib version have been upgraded (needed for Ubuntu upgrade to 24.04, Python to 3.12), but other components still require older version. As reana-commons is a submodule, docker image builds fail for certain components (reana-server and reana-workflow-engine-yadage):

[2024-08-05T10:34:56] reana-server: docker build -t docker.io/reanahub/reana-server:latest .
[+] Building 7.6s (14/14) FINISHED                                                                                                               docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                             0.0s
 => => transferring dockerfile: 3.52kB                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                  0.8s
 => [auth] library/ubuntu:pull token for registry-1.docker.io                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                0.0s
 => => transferring context: 370B                                                                                                                                0.0s
 => [1/9] FROM docker.io/library/ubuntu:20.04@sha256:0b897358ff6624825fb50d20ffb605ab0eaea77ced0adb8c6a4b756513dec6fc                                            0.0s
 => [internal] load build context                                                                                                                                0.1s
 => => transferring context: 216.40kB                                                                                                                            0.1s
 => CACHED [2/9] COPY requirements.txt /code/                                                                                                                    0.0s
 => CACHED [3/9] RUN apt-get update -y &&     apt-get install --no-install-recommends -y       gcc       git       libffi-dev       libpcre3       libpcre3-dev  0.0s
 => CACHED [4/9] WORKDIR /code                                                                                                                                   0.0s
 => CACHED [5/9] COPY . /code                                                                                                                                    0.0s
 => [6/9] RUN if [ "0" -gt 0 ]; then pip install --no-cache-dir -e ".[debug]"; else pip install --no-cache-dir .; fi;                                            2.3s
 => [7/9] RUN if test -e modules/reana-commons; then       if [ "0" -gt 0 ]; then         pip install --no-cache-dir -e "modules/reana-commons[kubernetes,yadag  3.9s
 => [8/9] RUN sed -i 's|^username_regex = re.compile\(.*\)$|username_regex = re.compile("^\\S+$")|g' /usr/local/lib/python3.8/dist-packages/invenio_userprofile  0.1s 
 => ERROR [9/9] RUN pip check                                                                                                                                    0.4s 
------                                                                                                                                                                
 > [9/9] RUN pip check:                                                                                                                                               
0.362 reana-server 0.95.0a1 has requirement adage==0.10.1, but you have adage 0.11.0.                                                                                 
------                                                                                                                                                                
Dockerfile:75
--------------------
  73 |     # Check for any broken Python dependencies
  74 |     # hadolint ignore=DL3059
  75 | >>> RUN pip check
  76 |     
  77 |     # Set useful environment variables
--------------------
ERROR: failed to solve: process "/bin/sh -c pip check" did not complete successfully: exit code: 1
[2024-08-05T10:34:56] reana-server: Command 'docker build -t docker.io/reanahub/reana-server:latest .' returned non-zero exit status 1.

Add a flag to skip submodule update if debug mode is used. Adding this flag (instead of e. g. --update-submodule and not doing submodule update by default in debug mode) to not interfere with current development flow.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 18.13%. Comparing base (9698c63) to head (9a09005).

Files Patch % Lines
reana/reana_dev/cluster.py 0.00% 5 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/reanahub/reana/pull/816/graphs/tree.svg?width=650&height=150&src=pr&token=NmV0ZCmqfN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub)](https://app.codecov.io/gh/reanahub/reana/pull/816?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub) ```diff @@ Coverage Diff @@ ## master #816 +/- ## ========================================== - Coverage 18.15% 18.13% -0.03% ========================================== Files 26 26 Lines 2478 2481 +3 ========================================== Hits 450 450 - Misses 2028 2031 +3 ``` | [Files](https://app.codecov.io/gh/reanahub/reana/pull/816?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub) | Coverage Δ | | |---|---|---| | [reana/reana\_dev/cluster.py](https://app.codecov.io/gh/reanahub/reana/pull/816?src=pr&el=tree&filepath=reana%2Freana_dev%2Fcluster.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=reanahub#diff-cmVhbmEvcmVhbmFfZGV2L2NsdXN0ZXIucHk=) | `0.00% <0.00%> (ø)` | |