Skip to content

Commit

Permalink
Increase age_limits on resources. We have a number of tests which kee…
Browse files Browse the repository at this point in the history
…p getting hit by the current defaults.
  • Loading branch information
tremble committed Nov 25, 2020
1 parent 725821a commit b1d0be5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ To start using `cleanup.py` you will need to:
cleanup : DEBUG ignored Ec2Instance: name=, id=i-0c18f88091e78898e age=0 days, 0:05:32, stale=False
cleanup : DEBUG checked Ec2Instance: name=, id=i-0630e2ba640d7dbf1 age=1 days, 20:49:03, stale=True

* The class property `age_limit` determines when a resource becomes stale. This is 10 minutes by default. Once a resource is stale, the terminator can delete it. Use check mode (-c or --check) to see what your class would delete without actually removing it.
* The class property `age_limit` determines when a resource becomes stale. This is 20 minutes by default. Once a resource is stale, the terminator can delete it. Use check mode (-c or --check) to see what your class would delete without actually removing it.
* Once a resource is stale you can test that it can be cleaned up by removing the check mode flag.
For example, `python cleanup.py --stage dev --target Ec2Instance -v`.
* You can forcibly delete resources that are not stale by using --force (or -f). Be aware that this can also remove resources that do not use the Terminator or DbTerminator base classes. Such unsupported resources will not be cleaned up by the CI account.
Expand Down
2 changes: 1 addition & 1 deletion aws/terminator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def create(credentials: boto3.Session) -> typing.List['Terminator']:

@property
def age_limit(self) -> datetime.timedelta:
return datetime.timedelta(minutes=10)
return datetime.timedelta(minutes=20)

@property
def id(self) -> typing.Optional[str]:
Expand Down
10 changes: 5 additions & 5 deletions aws/terminator/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create(credentials):

@property
def age_limit(self):
return datetime.timedelta(minutes=15)
return datetime.timedelta(minutes=25)

@property
def id(self):
Expand Down Expand Up @@ -101,7 +101,7 @@ def create(credentials):

@property
def age_limit(self):
return datetime.timedelta(minutes=15)
return datetime.timedelta(minutes=25)

@property
def id(self):
Expand Down Expand Up @@ -130,7 +130,7 @@ def create(credentials):

@property
def age_limit(self):
return datetime.timedelta(minutes=15)
return datetime.timedelta(minutes=25)

@property
def id(self):
Expand Down Expand Up @@ -220,7 +220,7 @@ def create(credentials):

@property
def age_limit(self):
return datetime.timedelta(minutes=15)
return datetime.timedelta(minutes=25)

@property
def id(self):
Expand Down Expand Up @@ -354,7 +354,7 @@ def create(credentials):

@property
def age_limit(self):
return datetime.timedelta(minutes=15)
return datetime.timedelta(minutes=30)

@property
def id(self):
Expand Down
4 changes: 2 additions & 2 deletions aws/terminator/security_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def terminate(self):
class Waf(DbTerminator):
@property
def age_limit(self):
return datetime.timedelta(minutes=20)
return datetime.timedelta(minutes=30)

@property
def change_token(self):
Expand All @@ -96,7 +96,7 @@ def create(credentials):
@property
def age_limit(self):
# Try to delete WafWebAcl first, because WafRule objects cannot be deleted if used in any WebACL
return datetime.timedelta(minutes=10)
return datetime.timedelta(minutes=20)

@property
def id(self):
Expand Down

0 comments on commit b1d0be5

Please sign in to comment.