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

C4-90 Update utils for new production envs #62

Merged
merged 2 commits into from
Mar 24, 2020
Merged

Conversation

willronchetti
Copy link
Member

  • Updates hard coded things to reflect the new (and old) reality
  • This should be reviewed fairly thoroughly to be sure nothing is missed

@coveralls
Copy link

coveralls commented Mar 24, 2020

Pull Request Test Coverage Report for Build 844

  • 6 of 8 (75.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 60.091%

Changes Missing Coverage Covered Lines Changed/Added Lines %
dcicutils/beanstalk_utils.py 3 4 75.0%
dcicutils/ff_utils.py 3 4 75.0%
Totals Coverage Status
Change from base Build 840: 0.01%
Covered Lines: 920
Relevant Lines: 1531

💛 - Coveralls

Copy link
Collaborator

@netsettler netsettler left a 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.

@@ -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:
Copy link
Collaborator

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:
Copy link
Collaborator

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']
Copy link
Collaborator

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.

@willronchetti willronchetti merged commit b854df5 into master Mar 24, 2020
@willronchetti willronchetti deleted the new_prod branch March 24, 2020 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants