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

[BUG] - z-conda-store-server fails to start #584

Closed
ibdafna opened this issue Sep 18, 2023 · 4 comments
Closed

[BUG] - z-conda-store-server fails to start #584

ibdafna opened this issue Sep 18, 2023 · 4 comments
Labels
type: bug 🐛 Something isn't working

Comments

@ibdafna
Copy link

ibdafna commented Sep 18, 2023

Describe the bug

I am running the following command after installing conda-store-server:

root@user-idafna:~/notebooks# conda-store-server --standalone

The following error appears:

root@user-idafna:~/notebooks# conda-store-server --standalone
Traceback (most recent call last):
  File "/root/notebooks/y/envs/condastore/bin/conda-store-server", line 7, in <module>
    from conda_store_server.server.__main__ import main
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/server/__main__.py", line 1, in <module>
    from conda_store_server.server.app import CondaStoreServer
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/server/app.py", line 25, in <module>
    from conda_store_server import storage
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/storage.py", line 11, in <module>
    from conda_store_server import orm, api, schema
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/orm.py", line 26, in <module>
    from conda_store_server import utils, schema
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/schema.py", line 39, in <module>
    class AuthenticationToken(BaseModel):
  File "/root/notebooks/y/envs/condastore/lib/python3.10/site-packages/conda_store_server/schema.py", line 44, in AuthenticationToken
    role_bindings: Dict[constr(regex=ARN_ALLOWED), List[str]] = {}
TypeError: constr() got an unexpected keyword argument 'regex'

Expected behavior

Conda store server should run.

How to Reproduce the problem?

Create a new environment:

micromamba create -n condastore python=3.10 "conda-store-server>=0.4.10"

Attempt running conda-store-server:

root@user-idafna:~/notebooks# conda-store-server --standalone

Output

Here is the output from conda-list:

root@user-idafna:~/notebooks# conda list
# packages in environment at /root/notebooks/y/envs/condastore:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
alembic                   1.12.0             pyhd8ed1ab_0    conda-forge
amqp                      5.1.1              pyhd8ed1ab_0    conda-forge
annotated-types           0.5.0              pyhd8ed1ab_0    conda-forge
anyio                     3.7.1              pyhd8ed1ab_0    conda-forge
async-timeout             4.0.3              pyhd8ed1ab_0    conda-forge
backports                 1.0                pyhd8ed1ab_3    conda-forge
backports.functools_lru_cache 1.6.5              pyhd8ed1ab_0    conda-forge
backports.zoneinfo        0.2.1           py310hff52083_7    conda-forge
billiard                  4.1.0           py310h2372a71_0    conda-forge
boltons                   23.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310hc6cd4ac_0    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.19.1               hd590300_0    conda-forge
ca-certificates           2023.7.22            hbcca054_0    conda-forge
celery                    5.3.4              pyhd8ed1ab_1    conda-forge
certifi                   2023.7.22          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h255011f_3    conda-forge
charset-normalizer        3.2.0              pyhd8ed1ab_0    conda-forge
click                     8.1.7           unix_pyh707e725_0    conda-forge
click-didyoumean          0.3.0              pyhd8ed1ab_0    conda-forge
click-plugins             1.1.1                      py_0    conda-forge
click-repl                0.3.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     23.7.4          py310hff52083_0    conda-forge
conda-docker              0.1.2              pyhd8ed1ab_0    conda-forge
conda-pack                0.7.1              pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
conda-standalone          23.7.3               ha770c72_0    conda-forge
conda-store-server        0.4.14             pyhd8ed1ab_0    conda-forge
configparser              5.3.0              pyhd8ed1ab_0    conda-forge
cryptography              41.0.3          py310h75e40e8_0    conda-forge
exceptiongroup            1.1.3              pyhd8ed1ab_0    conda-forge
fakechroot                2.20.1               h7f98852_1    conda-forge
fastapi                   0.103.1            pyhd8ed1ab_0    conda-forge
filelock                  3.12.4             pyhd8ed1ab_0    conda-forge
fmt                       10.1.1               h00ab1b0_0    conda-forge
future                    0.18.3             pyhd8ed1ab_0    conda-forge
greenlet                  2.0.2           py310hc6cd4ac_1    conda-forge
h11                       0.14.0             pyhd8ed1ab_0    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
importlib-metadata        6.8.0              pyha770c72_0    conda-forge
importlib_resources       6.0.1              pyhd8ed1ab_0    conda-forge
itsdangerous              2.1.2              pyhd8ed1ab_0    conda-forge
jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
jsonpatch                 1.32               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310hff52083_2    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
kombu                     5.3.2           py310hff52083_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libarchive                3.6.2                h039dbb9_1    conda-forge
libcurl                   8.3.0                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 13.2.0               h807b86a_1    conda-forge
libgomp                   13.2.0               h807b86a_1    conda-forge
libiconv                  1.17                 h166bdaf_0    conda-forge
libmamba                  1.5.1                h744094f_0    conda-forge
libmambapy                1.5.1           py310h39ff949_0    conda-forge
libnghttp2                1.52.0               h61bc06f_0    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsolv                   0.7.24               hfc55251_4    conda-forge
libsqlite                 3.43.0               h2797004_0    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_1    conda-forge
libuuid                   2.38.1               h0b41bf4_0    conda-forge
libxml2                   2.11.5               h232c23b_1    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
lz4-c                     1.9.4                hcb278e6_0    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
mako                      1.2.4              pyhd8ed1ab_0    conda-forge
mamba                     1.5.1           py310h51d5547_0    conda-forge
markupsafe                2.1.3           py310h2372a71_0    conda-forge
minio                     7.1.16             pyhd8ed1ab_0    conda-forge
multidict                 6.0.4           py310h1fa729e_0    conda-forge
ncurses                   6.4                  hcb278e6_0    conda-forge
openssl                   3.1.2                hd590300_0    conda-forge
packaging                 23.1               pyhd8ed1ab_0    conda-forge
pip                       23.2.1             pyhd8ed1ab_0    conda-forge
pluggy                    1.3.0              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.39             pyha770c72_0    conda-forge
prompt_toolkit            3.0.39               hd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.4           py310h5764c6d_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pydantic                  2.3.0              pyhd8ed1ab_0    conda-forge
pydantic-core             2.6.3           py310hcb5633a_0    conda-forge
pyjwt                     2.8.0              pyhd8ed1ab_0    conda-forge
pyopenssl                 23.2.0             pyhd8ed1ab_1    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.12         hd12c33a_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-docker             0.2.0              pyhd8ed1ab_0    conda-forge
python-multipart          0.0.6              pyhd8ed1ab_0    conda-forge
python-tzdata             2023.3             pyhd8ed1ab_0    conda-forge
python_abi                3.10                    3_cp310    conda-forge
pytz                      2023.3.post1       pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1           py310h2372a71_0    conda-forge
readline                  8.2                  h8228510_1    conda-forge
redis-py                  5.0.0              pyhd8ed1ab_0    conda-forge
reproc                    14.2.4               h0b41bf4_0    conda-forge
reproc-cpp                14.2.4               hcb278e6_0    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.17.32         py310h2372a71_0    conda-forge
ruamel.yaml.clib          0.2.7           py310h1fa729e_1    conda-forge
setuptools                68.2.2             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
sqlalchemy                2.0.20          py310h2372a71_0    conda-forge
starlette                 0.27.0             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tqdm                      4.66.1             pyhd8ed1ab_0    conda-forge
traitlets                 5.10.0             pyhd8ed1ab_0    conda-forge
typing-extensions         4.8.0                hd8ed1ab_0    conda-forge
typing_extensions         4.8.0              pyha770c72_0    conda-forge
tzdata                    2023c                h71feb2d_0    conda-forge
urllib3                   2.0.4              pyhd8ed1ab_0    conda-forge
uvicorn                   0.23.2          py310hff52083_0    conda-forge
vine                      5.0.0              pyhd8ed1ab_1    conda-forge
wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
wheel                     0.41.2             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
yaml                      0.2.5                h7f98852_2    conda-forge
yaml-cpp                  0.7.0                h27087fc_2    conda-forge
yarl                      1.9.2           py310h2372a71_0    conda-forge
zipp                      3.16.2             pyhd8ed1ab_0    conda-forge
zstandard                 0.21.0          py310h1275a96_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Versions and dependencies used.

Conda 23.7.4
Ubuntu 20.04

Anything else?

No response

@ibdafna ibdafna added the type: bug 🐛 Something isn't working label Sep 18, 2023
@trallard
Copy link
Collaborator

Now I am confused and this seems to be the same issue I reported in the comment of #593

This was not caught by any of the tests in the repo but was caught by the feedstock CI.

@nkaretnikov should be looking into this.

@nkaretnikov

This comment was marked as outdated.

@nkaretnikov
Copy link
Contributor

nkaretnikov commented Sep 23, 2023

@ibdafna

This is due to incompatible pydantic version. It needs to be 1.*. I'll create a new issue, so that this constraint is specified in future releases.

To fix: conda install pydantic=1.10.12.

To test (make sure you have no old state files in the current directory, like conda-store.sqlite):

conda create -n conda-store-584-repro -y
conda activate conda-store-584-repro
conda install  conda-store=0.4.14  conda-store-server=0.4.14 pydantic=1.10.12 -y
conda-store-server --standalone

Log in: user: test, password: password via http://localhost:5000/login/.

Add test environment by clicking on the + button or via http://localhost:5000/admin/create/

channels:
- conda-forge
dependencies:
- python=3.11.5
description: my test env
name: mytestenv
prefix: null
variables: null

Wait for it to build, see http://localhost:5000/admin/environment/default/mytestenv/.

Look up the env command by clicking on the build number or via http://localhost:5000/admin/build/1/.

Access it via the conda-store CLI:

conda activate conda-store-584-repro
CONDA_STORE_USERNAME=test CONDA_STORE_PASSWORD=password conda-store run default/mytestenv:1 -- python
# should start python 3.11.5

Please let me know if this fixes the issue for you, thanks!

@trallard
Copy link
Collaborator

This should be resolved as of 2023.10.3

@github-project-automation github-project-automation bot moved this from Follow up 📤 to Done 💪🏾 in conda-store 🐍 Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants