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

Unset minimum cell size in .env file leads to undeployable stack #111

Closed
1 task done
surchs opened this issue Feb 12, 2025 · 1 comment · Fixed by #106
Closed
1 task done

Unset minimum cell size in .env file leads to undeployable stack #111

surchs opened this issue Feb 12, 2025 · 1 comment · Fixed by #106
Assignees

Comments

@surchs
Copy link
Contributor

surchs commented Feb 12, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Expected Behavior

I can launch my local node stack without uncommenting the minimum cell size value in the .env file

Current Behavior

If I launch a local_node without first uncommenting the minimum cell size value in the .env file, the api service quits with an error.

Error message

...
  File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 67, in serve
    config.load()
  File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 477, in load
    self.loaded_app = import_from_string(self.app)
  File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
    module = importlib.import_module(module_str)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/src/./app/main.py", line 14, in <module>
    from .api import utility as util
  File "/usr/src/./app/api/utility.py", line 41, in <module>
    "NB_MIN_CELL_SIZE", int(os.environ.get("NB_MIN_CELL_SIZE", 0))
ValueError: invalid literal for int() with base 10: ''

Environment

We were using a special docker-compose recipe for deploying several local nodes behind a reverse proxy: https://gist.github.com/alyssadai/0f3d6b77c41cf77992d37e7d98bcbef9

How to reproduce

Use the linked gist and deploy a local_node profile, leave the NB_MIN_CELL_SIZE value commented out in the .env file

Anything else?

This could be linked to the fact that there is no default value defined in the docker-compose file for NB_MIN_CELL_SIZE.

@alyssadai alyssadai added the flag:schedule Flag issue that should go on the roadmap or backlog. label Feb 12, 2025
@surchs surchs moved this to Backlog in Neurobagel Feb 12, 2025
@surchs surchs removed the flag:schedule Flag issue that should go on the roadmap or backlog. label Feb 12, 2025
@alyssadai alyssadai moved this from Backlog to Specify - Active in Neurobagel Feb 12, 2025
@alyssadai alyssadai moved this from Specify - Active to Implement - Active in Neurobagel Feb 12, 2025
@alyssadai alyssadai self-assigned this Feb 12, 2025
@alyssadai
Copy link
Contributor

This bug is fixed by #106, but the underlying cause is described in and will be fixed by the PR for neurobagel/api#411.

@github-project-automation github-project-automation bot moved this from Implement - Active to Review - Done in Neurobagel Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review - Done
2 participants