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

[2598] staging deployment failure issue #468

Closed
wants to merge 15 commits into from
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ workflows:
filters:
branches:
only:
- main
- 2598-staging-deployment-failure-issue
- master
- /^release.*/

4 changes: 2 additions & 2 deletions .circleci/deployment/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
filters:
branches:
only:
- main
- 2598-staging-deployment-failure-issue
- deploy-staging:
requires:
- deploy-infrastructure-staging
filters:
branches:
only:
- main
- 2598-staging-deployment-failure-issue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you intending to leave these here for qasp testing or should these be reverted?

- deploy-infrastructure-develop:
filters:
branches:
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ update_backend()

# Do a zero downtime deploy. This requires enough memory for
# two apps to exist in the org/space at one time.
cf push "$CGAPPNAME_BACKEND" --no-route -f manifest.buildpack.yml --strategy rolling || exit 1
cf push "$CGAPPNAME_BACKEND" --no-route -f manifest.buildpack.yml -t 180 --strategy rolling || exit 1
else
cf push "$CGAPPNAME_BACKEND" --no-route -f manifest.buildpack.yml
cf push "$CGAPPNAME_BACKEND" --no-route -f manifest.buildpack.yml -t 180
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these might be insufficient for prod and we aren't running migrate automatically, perhaps we should ultimately remove the increase of timeout from default (60) to 180?

# set up JWT key if needed
if cf e "$CGAPPNAME_BACKEND" | grep -q JWT_KEY ; then
echo jwt cert already created
Expand Down
8 changes: 3 additions & 5 deletions tdrs-backend/gunicorn_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ else
( cd /home/vcap/deps/0/bin/; ./redis-server /home/vcap/app/redis.conf &)
fi

#
echo "Applying database migrations"
python manage.py makemigrations
python manage.py migrate
python manage.py populate_stts
# python manage.py makemigrations
# python manage.py migrate
# python manage.py populate_stts
Comment on lines +15 to +17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In testing steps of this PR, please provide the process we discussed during dev sync and/or ping me with relevant draft so we can be prepared for getting this fix to Alex.

python manage.py collectstatic --noinput

celery -A tdpservice.settings worker -c 1 &
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AccountApprovalStatusChoices(models.TextChoices):

class User(AbstractUser):
"""Define user fields and methods."""

class Meta:
"""Define meta user model attributes."""

Expand Down
13 changes: 13 additions & 0 deletions tdrs-backend/temp_debug_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import logging
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for a formal PR we should delete our debugger script since we determined this was not at cause.

from django.conf import settings
from tdpservice.users.models import User

logger = logging.getLogger()


print('_____ start debugging _____')
print('___')
print('_____ settings.DATABASES:: ' + str(settings.DATABASES))
user_ = User.objects.all()
print('_____ user_:: ' + str(user_))
print('_____ end debugging ______')
Loading