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

release: Stage Release 21st Feb 2023 #314

Merged
merged 53 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c60e771
chore: update all backend dependencies to the latest version
pablohashescobar Feb 1, 2023
9e9a6f4
feat: record issue completed at date when the issues are moved to fom…
pablohashescobar Feb 9, 2023
7c06be1
feat: cycle status (#265)
anmolsinghbhatia Feb 9, 2023
37c28b2
chore: update python runtime
pablohashescobar Feb 9, 2023
a403c0c
feat: label grouping in dropdowns, default state in project settings …
aaryan610 Feb 10, 2023
af22dc9
fix: remirror buttons (#267)
aaryan610 Feb 10, 2023
bb4ffec
feat: burndown chart (#268)
anmolsinghbhatia Feb 10, 2023
0a88b3e
fix: state reordering (#269)
aaryan610 Feb 13, 2023
d0afa48
feat: drag and drop an issue to delete (#270)
aaryan610 Feb 13, 2023
ebf294a
feat : cycle sidebar revamp (#271)
anmolsinghbhatia Feb 13, 2023
8fb34fe
feat : sidebar progress improvement (#272)
anmolsinghbhatia Feb 13, 2023
214e860
chore: removed minor bugs (#273)
aaryan610 Feb 13, 2023
c6f0990
fix: ui bug (#274)
anmolsinghbhatia Feb 13, 2023
97ffdc8
feat: default state for project (#264)
pablohashescobar Feb 13, 2023
7a3c00a
Merge pull request #226 from makeplane/chore/backend_dependencies
pablohashescobar Feb 13, 2023
0477db6
build: add channels requirement for the asgi configuration (#225)
pablohashescobar Feb 13, 2023
af1d49b
refactor: combine sign in and sign up endpoint to a single endpoint (…
pablohashescobar Feb 13, 2023
92d5749
feat: state grouping and ordering list (#253)
pablohashescobar Feb 13, 2023
7950f19
dev: added migrations for new models schema changes
vamsi Feb 13, 2023
9c8c7f1
fix: mac text copy fix (#277)
anmolsinghbhatia Feb 14, 2023
e53ff4c
feat: state description in settings (#275)
aaryan610 Feb 14, 2023
fcba332
refactor: update django admin panel heading (#276)
pablohashescobar Feb 14, 2023
6f0539f
feat: create label option in create issue modal (#281)
aaryan610 Feb 14, 2023
ab0ce2f
refactor: issue details page (#282)
aaryan610 Feb 15, 2023
9b51a91
fix: shortcut search (#283)
anmolsinghbhatia Feb 15, 2023
f21135d
feat: module sidebar date and status updated (#285)
anmolsinghbhatia Feb 15, 2023
ec37bb9
feat: bulk assign sub-issues (#284)
aaryan610 Feb 15, 2023
667dafb
fix: consistent dropdowns, refactor: ui components (#286)
aaryan610 Feb 16, 2023
6ed5c05
build(deps): bump django in /apiserver/requirements (#289)
dependabot[bot] Feb 16, 2023
a28be95
fix: workspace name and breadcrumb title , refactor: command palette …
anmolsinghbhatia Feb 16, 2023
1665863
feat: copy link option (#292)
anmolsinghbhatia Feb 17, 2023
4b06839
fix: remirror image not updating (#294)
aaryan610 Feb 17, 2023
a66b2fd
feat: resend login magic code (#291)
dakshesh14 Feb 17, 2023
7c1f357
feat: issue links (#288)
pablohashescobar Feb 17, 2023
45319d8
fix: default label color (#295)
aaryan610 Feb 17, 2023
8c39717
fix: ui changes (#297)
anmolsinghbhatia Feb 17, 2023
a0d176c
refractor: use local storage hook (#293)
dakshesh14 Feb 17, 2023
c979599
fix: assignee and labels field while editing an issue (#296)
aaryan610 Feb 17, 2023
fcb932d
fix: issue title resizing fix (#300)
anmolsinghbhatia Feb 17, 2023
d71cf56
fix: try/catch for invalid values stored in local storage (#301)
dakshesh14 Feb 17, 2023
11a36b4
fix: create issue modal closing on clicking on Grammarly recommendati…
dakshesh14 Feb 17, 2023
393638c
style: not showing pointer & theme color on resend code button disabl…
dakshesh14 Feb 17, 2023
77c319c
fix: new project issues response (#303)
aaryan610 Feb 18, 2023
e5934e0
refactor/cycles_folder_structure (#304)
aaryan610 Feb 20, 2023
2020965
fix: ui changes (#306)
anmolsinghbhatia Feb 20, 2023
818fe3e
feat: manual ordering of issues (#305)
aaryan610 Feb 20, 2023
33e2986
feat: global component for links list (#307)
aaryan610 Feb 21, 2023
bdca84b
Feat: Dockerizing using nginx reverse proxy (#280)
sriramveeraghanta Feb 21, 2023
3d28cde
feat: edit module (#309)
anmolsinghbhatia Feb 21, 2023
8c15a15
refactor: dnd function (#308)
aaryan610 Feb 21, 2023
8d6a357
refactor: manual ordering bugs (#312)
aaryan610 Feb 21, 2023
c0263ac
refactor: create issue modal input fields (#310)
aaryan610 Feb 21, 2023
5cbb3ec
style: showing user sign-in progress on sign-in with code (#311)
dakshesh14 Feb 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `config`
// extends: ["custom"],
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ["custom"],
settings: {
next: {
rootDir: ["apps/*/"],
rootDir: ["apps/*"],
},
},
};
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ package-lock.json
.vscode

# Sentry
.sentryclirc
.sentryclirc

# lock files
package-lock.json
pnpm-lock.yaml
pnpm-workspace.yaml
116 changes: 116 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
FROM node:18-alpine AS builder
RUN apk add --no-cache libc6-compat
RUN apk update
# Set working directory
WORKDIR /app

RUN yarn global add turbo
COPY . .

RUN turbo prune --scope=app --docker

# Add lockfile and package.json's of isolated subworkspace
FROM node:18-alpine AS installer


RUN apk add --no-cache libc6-compat
RUN apk update
WORKDIR /app

# First install the dependencies (as they change less often)
COPY .gitignore .gitignore
COPY --from=builder /app/out/json/ .
COPY --from=builder /app/out/yarn.lock ./yarn.lock
RUN yarn install

# Build the project
COPY --from=builder /app/out/full/ .
COPY turbo.json turbo.json

RUN yarn turbo run build --filter=app


FROM python:3.11.1-alpine3.17 AS backend

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1

WORKDIR /code

RUN apk --update --no-cache add \
"libpq~=15" \
"libxslt~=1.1" \
"nodejs-current~=19" \
"xmlsec~=1.2" \
"nginx" \
"nodejs" \
"npm" \
"supervisor"

COPY apiserver/requirements.txt ./
COPY apiserver/requirements ./requirements
RUN apk add libffi-dev
RUN apk --update --no-cache --virtual .build-deps add \
"bash~=5.2" \
"g++~=12.2" \
"gcc~=12.2" \
"cargo~=1.64" \
"git~=2" \
"make~=4.3" \
"postgresql13-dev~=13" \
"libc-dev" \
"linux-headers" \
&& \
pip install -r requirements.txt --compile --no-cache-dir \
&& \
apk del .build-deps

# Add in Django deps and generate Django's static files
COPY apiserver/manage.py manage.py
COPY apiserver/plane plane/
COPY apiserver/templates templates/

COPY apiserver/gunicorn.config.py ./
RUN apk --update --no-cache add "bash~=5.2"
COPY apiserver/bin ./bin/

RUN chmod +x ./bin/takeoff ./bin/worker
RUN chmod -R 777 /code

# Expose container port and run entry point script
EXPOSE 8000
EXPOSE 3000
EXPOSE 80



WORKDIR /app

# Don't run production as root
RUN addgroup --system --gid 1001 plane
RUN adduser --system --uid 1001 captain

COPY --from=installer /app/apps/app/next.config.js .
COPY --from=installer /app/apps/app/package.json .

COPY --from=installer --chown=captain:plane /app/apps/app/.next/standalone ./

COPY --from=installer --chown=captain:plane /app/apps/app/.next/static ./apps/app/.next/static

ENV NEXT_TELEMETRY_DISABLED 1

# RUN rm /etc/nginx/conf.d/default.conf
#######################################################################
COPY nginx/nginx-single-docker-image.conf /etc/nginx/http.d/default.conf
#######################################################################

COPY nginx/supervisor.conf /code/supervisor.conf


CMD ["supervisord","-c","/code/supervisor.conf"]




20 changes: 12 additions & 8 deletions apiserver/.env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Backend
SECRET_KEY="<-- django secret -->"
DJANGO_SETTINGS_MODULE="plane.settings.production"
# Database
DATABASE_URL=postgres://plane:plane@plane-db-1:5432/plane
# Cache
REDIS_URL=redis://redis:6379/
# SMPT
EMAIL_HOST="<-- email smtp -->"
EMAIL_HOST_USER="<-- email host user -->"
EMAIL_HOST_PASSWORD="<-- email host password -->"

# AWS
AWS_REGION="<-- aws region -->"
AWS_ACCESS_KEY_ID="<-- aws access key -->"
AWS_SECRET_ACCESS_KEY="<-- aws secret acess key -->"
AWS_S3_BUCKET_NAME="<-- aws s3 bucket name -->"

SENTRY_DSN="<-- sentry dsn -->"
WEB_URL="<-- frontend web url -->"

# FE
WEB_URL="localhost/"
# OAUTH
GITHUB_CLIENT_SECRET="<-- github secret -->"

# Flags
DISABLE_COLLECTSTATIC=1
DOCKERIZED=0 //True if running docker compose else 0
DOCKERIZED=1
19 changes: 10 additions & 9 deletions apiserver/Dockerfile.api
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8.14-alpine3.16 AS backend
FROM python:3.11.1-alpine3.17 AS backend

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
Expand All @@ -8,19 +8,19 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1
WORKDIR /code

RUN apk --update --no-cache add \
"libpq~=14" \
"libpq~=15" \
"libxslt~=1.1" \
"nodejs-current~=18" \
"nodejs-current~=19" \
"xmlsec~=1.2"

COPY requirements.txt ./
COPY requirements ./requirements
RUN apk add libffi-dev
RUN apk --update --no-cache --virtual .build-deps add \
"bash~=5.1" \
"g++~=11.2" \
"gcc~=11.2" \
"cargo~=1.60" \
"bash~=5.2" \
"g++~=12.2" \
"gcc~=12.2" \
"cargo~=1.64" \
"git~=2" \
"make~=4.3" \
"postgresql13-dev~=13" \
Expand All @@ -46,15 +46,16 @@ COPY templates templates/

COPY gunicorn.config.py ./
USER root
RUN apk --update --no-cache add "bash~=5.1"
RUN apk --update --no-cache add "bash~=5.2"
COPY ./bin ./bin/

RUN chmod +x ./bin/takeoff ./bin/worker
RUN chmod -R 777 /code

USER captain

# Expose container port and run entry point script
EXPOSE 8000

CMD [ "./bin/takeoff" ]
# CMD [ "./bin/takeoff" ]

4 changes: 4 additions & 0 deletions apiserver/bin/takeoff
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
set -e
python manage.py wait_for_db
python manage.py migrate

# Create a Default User
python bin/user_script.py

exec gunicorn -w 8 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --config gunicorn.config.py --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
28 changes: 28 additions & 0 deletions apiserver/bin/user_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os, sys
import uuid

sys.path.append("/code")

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "plane.settings.production")
import django

django.setup()

from plane.db.models import User


def populate():
default_email = os.environ.get("DEFAULT_EMAIL", "captain@plane.so")
default_password = os.environ.get("DEFAULT_PASSWORD", "password123")

if not User.objects.filter(email=default_email).exists():
user = User.objects.create(email=default_email, username=uuid.uuid4().hex)
user.set_password(default_password)
user.save()
print("User created")

print("Success")


if __name__ == "__main__":
populate()
57 changes: 57 additions & 0 deletions apiserver/plane/api/serializers/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@
Cycle,
Module,
ModuleIssue,
IssueLink,
)


class IssueLinkCreateSerializer(serializers.Serializer):
url = serializers.CharField(required=True)
title = serializers.CharField(required=False)


class IssueFlatSerializer(BaseSerializer):
## Contain only flat fields

Expand Down Expand Up @@ -86,6 +92,11 @@ class IssueCreateSerializer(BaseSerializer):
write_only=True,
required=False,
)
links_list = serializers.ListField(
child=IssueLinkCreateSerializer(),
write_only=True,
required=False,
)

class Meta:
model = Issue
Expand All @@ -104,6 +115,7 @@ def create(self, validated_data):
assignees = validated_data.pop("assignees_list", None)
labels = validated_data.pop("labels_list", None)
blocks = validated_data.pop("blocks_list", None)
links = validated_data.pop("links_list", None)

project = self.context["project"]
issue = Issue.objects.create(**validated_data, project=project)
Expand Down Expand Up @@ -172,13 +184,32 @@ def create(self, validated_data):
batch_size=10,
)

if links is not None:
IssueLink.objects.bulk_create(
[
IssueLink(
issue=issue,
project=project,
workspace=project.workspace,
created_by=issue.created_by,
updated_by=issue.updated_by,
title=link.get("title", None),
url=link.get("url", None),
)
for link in links
],
batch_size=10,
ignore_conflicts=True,
)

return issue

def update(self, instance, validated_data):
blockers = validated_data.pop("blockers_list", None)
assignees = validated_data.pop("assignees_list", None)
labels = validated_data.pop("labels_list", None)
blocks = validated_data.pop("blocks_list", None)
links = validated_data.pop("links_list", None)

if blockers is not None:
IssueBlocker.objects.filter(block=instance).delete()
Expand Down Expand Up @@ -248,6 +279,25 @@ def update(self, instance, validated_data):
batch_size=10,
)

if links is not None:
IssueLink.objects.filter(issue=instance).delete()
IssueLink.objects.bulk_create(
[
IssueLink(
issue=instance,
project=instance.project,
workspace=instance.project.workspace,
created_by=instance.created_by,
updated_by=instance.updated_by,
title=link.get("title", None),
url=link.get("url", None),
)
for link in links
],
batch_size=10,
ignore_conflicts=True,
)

return super().update(instance, validated_data)


Expand Down Expand Up @@ -410,6 +460,12 @@ class Meta:
]


class IssueLinkSerializer(BaseSerializer):
class Meta:
model = IssueLink
fields = "__all__"


class IssueSerializer(BaseSerializer):
project_detail = ProjectSerializer(read_only=True, source="project")
state_detail = StateSerializer(read_only=True, source="state")
Expand All @@ -422,6 +478,7 @@ class IssueSerializer(BaseSerializer):
blocker_issues = BlockerIssueSerializer(read_only=True, many=True)
issue_cycle = IssueCycleDetailSerializer(read_only=True)
issue_module = IssueModuleDetailSerializer(read_only=True)
issue_link = IssueLinkSerializer(read_only=True, many=True)
sub_issues_count = serializers.IntegerField(read_only=True)

class Meta:
Expand Down
2 changes: 0 additions & 2 deletions apiserver/plane/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from plane.api.views import (
# Authentication
SignUpEndpoint,
SignInEndpoint,
SignOutEndpoint,
MagicSignInEndpoint,
Expand Down Expand Up @@ -95,7 +94,6 @@
path("social-auth/", OauthEndpoint.as_view(), name="oauth"),
# Auth
path("sign-in/", SignInEndpoint.as_view(), name="sign-in"),
path("sign-up/", SignUpEndpoint.as_view(), name="sign-up"),
path("sign-out/", SignOutEndpoint.as_view(), name="sign-out"),
# Magic Sign In/Up
path(
Expand Down
Loading