From 6bfeb6af347699659d52d3a655589f82c3c0b9ce Mon Sep 17 00:00:00 2001 From: pablohashescobar <118773738+pablohashescobar@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:58:24 +0530 Subject: [PATCH] chore: upgrade backend dependencies (#1479) * chore: upgrade backend dependencies * dev: update storage settings for self hosted version --- apiserver/plane/api/views/issue.py | 2 +- apiserver/plane/settings/production.py | 10 +++++----- apiserver/plane/urls.py | 6 ++---- apiserver/requirements/base.txt | 14 +++++++------- apiserver/requirements/local.txt | 2 +- apiserver/requirements/production.txt | 7 +++---- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/apiserver/plane/api/views/issue.py b/apiserver/plane/api/views/issue.py index 36b3411fc..bfefc91ba 100644 --- a/apiserver/plane/api/views/issue.py +++ b/apiserver/plane/api/views/issue.py @@ -256,7 +256,7 @@ class IssueViewSet(BaseViewSet): return Response(issues, status=status.HTTP_200_OK) except Exception as e: - capture_exception(e) + print(e) return Response( {"error": "Something went wrong please try again later"}, status=status.HTTP_400_BAD_REQUEST, diff --git a/apiserver/plane/settings/production.py b/apiserver/plane/settings/production.py index 983931110..7e76404f6 100644 --- a/apiserver/plane/settings/production.py +++ b/apiserver/plane/settings/production.py @@ -13,9 +13,7 @@ from sentry_sdk.integrations.redis import RedisIntegration from .common import * # noqa # Database -DEBUG = int(os.environ.get( - "DEBUG", 0 -)) == 1 +DEBUG = int(os.environ.get("DEBUG", 0)) == 1 DATABASES = { "default": { @@ -89,7 +87,7 @@ if bool(os.environ.get("SENTRY_DSN", False)): if DOCKERIZED and USE_MINIO: INSTALLED_APPS += ("storages",) - DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" + STORAGES = {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage"}} # The AWS access key to use. AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID", "access-key") # The AWS secret access key to use. @@ -97,7 +95,9 @@ if DOCKERIZED and USE_MINIO: # The name of the bucket to store files in. AWS_STORAGE_BUCKET_NAME = os.environ.get("AWS_S3_BUCKET_NAME", "uploads") # The full URL to the S3 endpoint. Leave blank to use the default region URL. - AWS_S3_ENDPOINT_URL = os.environ.get("AWS_S3_ENDPOINT_URL", "http://plane-minio:9000") + AWS_S3_ENDPOINT_URL = os.environ.get( + "AWS_S3_ENDPOINT_URL", "http://plane-minio:9000" + ) # Default permissions AWS_DEFAULT_ACL = "public-read" AWS_QUERYSTRING_AUTH = False diff --git a/apiserver/plane/urls.py b/apiserver/plane/urls.py index a2244ffe0..2b83ef8cf 100644 --- a/apiserver/plane/urls.py +++ b/apiserver/plane/urls.py @@ -3,11 +3,10 @@ """ # from django.contrib import admin -from django.urls import path +from django.urls import path, include, re_path from django.views.generic import TemplateView from django.conf import settings -from django.conf.urls import include, url, static # from django.conf.urls.static import static @@ -18,11 +17,10 @@ urlpatterns = [ path("", include("plane.web.urls")), ] -urlpatterns = urlpatterns + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: import debug_toolbar urlpatterns = [ - url(r"^__debug__/", include(debug_toolbar.urls)), + re_path(r"^__debug__/", include(debug_toolbar.urls)), ] + urlpatterns diff --git a/apiserver/requirements/base.txt b/apiserver/requirements/base.txt index 3cd196830..537564828 100644 --- a/apiserver/requirements/base.txt +++ b/apiserver/requirements/base.txt @@ -1,28 +1,28 @@ # base requirements -Django==3.2.19 +Django==4.2.3 django-braces==1.15.0 django-taggit==4.0.0 psycopg2==2.9.6 django-oauth-toolkit==2.3.0 -mistune==2.0.4 +mistune==3.0.1 djangorestframework==3.14.0 redis==4.6.0 django-nested-admin==4.0.2 django-cors-headers==4.1.0 -whitenoise==6.3.0 +whitenoise==6.5.0 django-allauth==0.54.0 -faker==13.4.0 +faker==18.11.2 django-filter==23.2 jsonmodels==2.6.0 djangorestframework-simplejwt==5.2.2 -sentry-sdk==1.26.0 +sentry-sdk==1.27.0 django-s3-storage==0.14.0 django-crum==0.7.9 django-guardian==2.4.0 dj_rest_auth==2.2.5 -google-auth==2.16.0 -google-api-python-client==2.75.0 +google-auth==2.21.0 +google-api-python-client==2.92.0 django-redis==5.3.0 uvicorn==0.22.0 channels==4.0.0 diff --git a/apiserver/requirements/local.txt b/apiserver/requirements/local.txt index efd74a071..426236ed8 100644 --- a/apiserver/requirements/local.txt +++ b/apiserver/requirements/local.txt @@ -1,3 +1,3 @@ -r base.txt -django-debug-toolbar==3.8.1 \ No newline at end of file +django-debug-toolbar==4.1.0 \ No newline at end of file diff --git a/apiserver/requirements/production.txt b/apiserver/requirements/production.txt index 13b3e9aed..30d9dc9bb 100644 --- a/apiserver/requirements/production.txt +++ b/apiserver/requirements/production.txt @@ -2,11 +2,10 @@ dj-database-url==2.0.0 gunicorn==20.1.0 -whitenoise==6.3.0 +whitenoise==6.5.0 django-storages==1.13.2 -boto3==1.26.163 +boto3==1.27.0 django-anymail==10.0 -twilio==7.16.2 -django-debug-toolbar==3.8.1 +django-debug-toolbar==4.1.0 gevent==22.10.2 psycogreen==1.0.2 \ No newline at end of file