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

Fix watchman default status check to no return an error #1626

Open
jonespm opened this issue Oct 24, 2024 · 0 comments
Open

Fix watchman default status check to no return an error #1626

jonespm opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@jonespm
Copy link
Member

jonespm commented Oct 24, 2024

Expected behavior (A description of what you expected to happen) :

When you call /status it shoudn't have any errors by default. Currently we workaround this with the the URL

/status/?skip=watchman.checks.storage but it would be nice it it worked.

Describe the bug (Tell us what happens instead of the expected behavior) :

There's a stacktrace in the storage section and it returns an error. It would be nice to fix this so we don't have to workaround it.

  "storage": {
    "ok": false,
    "error": "Could not find config for 'default' in settings.STORAGES.",
    "stacktrace": "Traceback (most recent call last):\n  File \"/usr/local/lib/python3.10/site-packages/django/core/files/storage/handler.py\", line 35, in __getitem__\n    return self._storages[alias]\nKeyError:

I think this might be fixed by just configuring a placeholder InMemoryStorage like. The better if the watchman library checked to see if this was configured or handled the exception and just didn't print anything for storage. But this should work for us

STORAGES = {
    'default': {
        'BACKEND': 'django.core.files.storage.InMemoryStorage',
    },
}

Steps to Reproduce :

  1. Startup MyLA and go to the URL for /status and /status/bare_status. You should get a 200 response and no errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant