Skip to content

Commit

Permalink
fixes upstream merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
bwchhibber committed Aug 20, 2019
2 parents 35b3a92 + b7585fd commit 1be2d9f
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 9 deletions.
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,35 @@ Categories: Added, Removed, Changed, Fixed, Nonfunctional, Deprecated

## Unreleased

- Fix recursion in sceptre_user_data becoming infinite
## 2.2.1 (2019.08.19)

### Fixed

- `typing` install dependency for Python version < 3.5
- Race condition in stacks causing RecurrsiveGet exception

## 2.2.0 (2019.08.16)

### Added

- Meaningful Jinja Template exception output handling

### Fixed

- Recursion in `sceptre_user_data` becoming infinite
- AWS `rate_exceeded` error when hitting AWS API too frequently
- Readme links
- StackGraph debugging output

### Nonfunctional

- Moved CircleCI Dockerfile to its own repository
- Add SonarQube analysis
- Change CircleCI setup to use context over environment variables
- Removed redundant test code
- Add badges to README
- Adjust Coverage fail-level to 92%
- Update CONTRIBUTING Guide

## 2.1.5 (2019.06.28)

Expand Down
1 change: 1 addition & 0 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ colorama==0.3.9
Jinja2>=2.8,<3
networkx==2.1
PyYaml>=5.1,<6.0
typing>=3.7,<3.8
2 changes: 1 addition & 1 deletion sceptre/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

__author__ = 'Cloudreach'
__email__ = '[email protected]'
__version__ = '2.1.5'
__version__ = '2.2.1'


# Set up logging to ``/dev/null`` like a library is supposed to.
Expand Down
4 changes: 2 additions & 2 deletions sceptre/connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def decorated(*args, **kwargs):
time.sleep(mdelay)

# Using De-correlated Jitter Algorithm
# We are picking number between a ceiling (delay_cap) of 45 seconds and the last
# delay multiplied by 2.5, rounding to two decimal places.
# We are picking number between a ceiling (delay_cap) of 45 seconds and the
# last delay multiplied by 2.5, rounding to two decimal places.
mdelay = min(delay_cap, round((random.uniform(1, mdelay * 2.5)), 2))

attempts += 1
Expand Down
9 changes: 6 additions & 3 deletions sceptre/resolvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import abc
import logging
from contextlib import contextmanager
from threading import RLock

import six
from sceptre.helpers import _call_func_on_values
Expand Down Expand Up @@ -64,6 +65,7 @@ def __init__(self, name):
self.name = "_" + name
self.logger = logging.getLogger(__name__)
self._get_in_progress = False
self._lock = RLock()

def __get__(self, instance, type):
"""
Expand All @@ -73,7 +75,7 @@ def __get__(self, instance, type):
:return: The attribute stored with the suffix ``name`` in the instance.
:rtype: dict or list
"""
with self._no_recursive_get():
with self._lock, self._no_recursive_get():
def resolve(attr, key, value):
try:
attr[key] = value.resolve()
Expand All @@ -97,8 +99,9 @@ def setup(attr, key, value):
value.stack = instance
value.setup()

_call_func_on_values(setup, value, Resolver)
setattr(instance, self.name, value)
with self._lock:
_call_func_on_values(setup, value, Resolver)
setattr(instance, self.name, value)

class ResolveLater(object):
"""Represents a value that could not yet be resolved but can be resolved in the future."""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.1.5
current_version = 2.2.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)|(?P<release_candidate>.*)
commit = True
tag = True
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"colorama==0.3.9",
"packaging==16.8",
"six>=1.11.0,<2.0.0",
"networkx==2.1"
"networkx==2.1",
"typing>=3.7.0,<3.8.0"
]

test_requirements = [
Expand Down

0 comments on commit 1be2d9f

Please sign in to comment.