Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebdah committed Sep 29, 2015
2 parents 899ea62 + bf5a397 commit 1c27901
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 20 deletions.
8 changes: 8 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release notes
=============

2.0.1
-----

**Release date:** 2015-09-29

- Fix value error when logging floats (`#265 <https://github.com/sebdah/dynamic-dynamodb/issues/265>`)
- Fix installation on Python < 2.7 (`#260 <https://github.com/sebdah/dynamic-dynamodb/issues/260>`). Thanks for the pull request `@Sazpaimon <https://github.com/Sazpaimon>`

2.0.0
-----

Expand Down
20 changes: 10 additions & 10 deletions dynamic_dynamodb/core/gsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def ensure_provisioning(
# Handle throughput updates
if read_update_needed or write_update_needed:
logger.info(
'{0} - GSI: {1} - Changing provisioning to {2:d} '
'read units and {3:d} write units'.format(
'{0} - GSI: {1} - Changing provisioning to {2:f} '
'read units and {3:f} write units'.format(
table_name,
gsi_name,
int(updated_read_units),
Expand Down Expand Up @@ -1017,9 +1017,9 @@ def __ensure_provisioning_alarm(table_name, table_key, gsi_name, gsi_key):
consumed_read_units_percent >= reads_upper_alarm_threshold):
upper_alert_triggered = True
upper_alert_message.append(
'{0} - GSI: {1} - Consumed Read Capacity {2:d}% '
'{0} - GSI: {1} - Consumed Read Capacity {2:f}% '
'was greater than or equal to the upper alarm '
'threshold {3:d}%\n'.format(
'threshold {3:f}%\n'.format(
table_name,
gsi_name,
consumed_read_units_percent,
Expand All @@ -1029,9 +1029,9 @@ def __ensure_provisioning_alarm(table_name, table_key, gsi_name, gsi_key):
consumed_write_units_percent >= writes_upper_alarm_threshold):
upper_alert_triggered = True
upper_alert_message.append(
'{0} - GSI: {1} - Consumed Write Capacity {2:d}% '
'{0} - GSI: {1} - Consumed Write Capacity {2:f}% '
'was greater than or equal to the upper alarm '
'threshold {3:d}%\n'.format(
'threshold {3:f}%\n'.format(
table_name,
gsi_name,
consumed_write_units_percent,
Expand All @@ -1044,8 +1044,8 @@ def __ensure_provisioning_alarm(table_name, table_key, gsi_name, gsi_key):
consumed_read_units_percent < reads_lower_alarm_threshold):
lower_alert_triggered = True
lower_alert_message.append(
'{0} - GSI: {1} - Consumed Read Capacity {2:d}% '
'was below the lower alarm threshold {3:d}%\n'.format(
'{0} - GSI: {1} - Consumed Read Capacity {2:f}% '
'was below the lower alarm threshold {3:f}%\n'.format(
table_name,
gsi_name,
consumed_read_units_percent,
Expand All @@ -1055,8 +1055,8 @@ def __ensure_provisioning_alarm(table_name, table_key, gsi_name, gsi_key):
consumed_write_units_percent < writes_lower_alarm_threshold):
lower_alert_triggered = True
lower_alert_message.append(
'{0} - GSI: {1} - Consumed Write Capacity {2:d}% '
'was below the lower alarm threshold {3:d}%\n'.format(
'{0} - GSI: {1} - Consumed Write Capacity {2:f}% '
'was below the lower alarm threshold {3:f}%\n'.format(
table_name,
gsi_name,
consumed_write_units_percent,
Expand Down
16 changes: 8 additions & 8 deletions dynamic_dynamodb/core/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,9 +863,9 @@ def __ensure_provisioning_alarm(table_name, key_name):
consumed_read_units_percent >= reads_upper_alarm_threshold):
upper_alert_triggered = True
upper_alert_message.append(
'{0} - Consumed Read Capacity {1:d}% '
'{0} - Consumed Read Capacity {1:f}% '
'was greater than or equal to the upper '
'alarm threshold {2:d}%\n'.format(
'alarm threshold {2:f}%\n'.format(
table_name,
consumed_read_units_percent,
reads_upper_alarm_threshold))
Expand All @@ -874,9 +874,9 @@ def __ensure_provisioning_alarm(table_name, key_name):
consumed_write_units_percent >= writes_upper_alarm_threshold):
upper_alert_triggered = True
upper_alert_message.append(
'{0} - Consumed Write Capacity {1:d}% '
'{0} - Consumed Write Capacity {1:f}% '
'was greater than or equal to the upper alarm '
'threshold {2:d}%\n'.format(
'threshold {2:f}%\n'.format(
table_name,
consumed_write_units_percent,
writes_upper_alarm_threshold))
Expand All @@ -888,8 +888,8 @@ def __ensure_provisioning_alarm(table_name, key_name):
consumed_read_units_percent < reads_lower_alarm_threshold):
lower_alert_triggered = True
lower_alert_message.append(
'{0} - Consumed Read Capacity {1:d}% '
'was below the lower alarm threshold {2:d}%\n'.format(
'{0} - Consumed Read Capacity {1:f}% '
'was below the lower alarm threshold {2:f}%\n'.format(
table_name,
consumed_read_units_percent,
reads_lower_alarm_threshold))
Expand All @@ -898,8 +898,8 @@ def __ensure_provisioning_alarm(table_name, key_name):
consumed_write_units_percent < writes_lower_alarm_threshold):
lower_alert_triggered = True
lower_alert_message.append(
'{0} - Consumed Write Capacity {1:d}% '
'was below the lower alarm threshold {2:d}%\n'.format(
'{0} - Consumed Write Capacity {1:f}% '
'was below the lower alarm threshold {2:f}%\n'.format(
table_name,
consumed_write_units_percent,
writes_lower_alarm_threshold))
Expand Down
2 changes: 1 addition & 1 deletion dynamic_dynamodb/dynamic-dynamodb.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[general]
version: 2.0.0
version: 2.0.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def return_requires():
'requests >= 0.14.1',
'logutils >= 0.3.3',
'retrying >= 1.3.3'
],
]
if sys.version_info < (2, 7):
install_requires.append('ordereddict >= 1.1')
return install_requires
Expand Down

0 comments on commit 1c27901

Please sign in to comment.