-
Notifications
You must be signed in to change notification settings - Fork 1
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
C4-90 Update utils for new production envs #62
Conversation
willronchetti
commented
Mar 24, 2020
- Updates hard coded things to reflect the new (and old) reality
- This should be reviewed fairly thoroughly to be sure nothing is missed
Pull Request Test Coverage Report for Build 844
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of my comments are blockers. This seems OK.
dcicutils/beanstalk_utils.py
Outdated
@@ -48,7 +48,7 @@ def delete_db(db_identifier, take_snapshot=True, allow_delete_prod=False): | |||
dict: boto3 response from delete_db_instance | |||
""" | |||
# safety. Do not allow accidental programmatic deletion of webprod DB | |||
if 'webprod' in db_identifier and not allow_delete_prod: | |||
if ('webprod' in db_identifier or 'production' in db_identifier) and not allow_delete_prod: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be safer to just do 'prod' in identifier
?
@@ -246,7 +246,7 @@ def get_beanstalk_real_url(env): | |||
if env in urls: | |||
return urls[env] | |||
|
|||
if 'webprod' in env: | |||
if 'webprod' in env or 'blue' in env or 'green' in env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is VERY fragile. Later we should change the environments to be fourfront-prod-blue
and fourfront-prod-green
so that blue/green can be used for other things (e.g., fourfront-mastertest-blue
and fourfront-mastertest-green
. This is OK for now, but I made a ticket to address it. Please add a comment saying something like:
#TODO (C4-91): reconsider environment names
@@ -22,6 +22,8 @@ | |||
HIGLASS_BUCKETS = ['elasticbeanstalk-fourfront-webprod-wfoutput', | |||
'elasticbeanstalk-fourfront-webdev-wfoutput'] | |||
|
|||
PRODUCTION_ENVS = ['fourfront-blue', 'fourfront-green'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did this in fourfront
in commands/create_mapping_on_deploy.py
and really need to centralize these. I started a PR for that and will try to follow up later. It's bad to have these in multiple places since if we update one and not another we'll get a mess. I made a ticket C4-92. Please add a TODO comment citing that ticket.