Skip to content

Commit cc8ff4f

Browse files
authored
Merge pull request #121 from satellite-no/feature/allow-ec2-role
if sqs sensor config None set to None
2 parents 0cb5beb + 26b10ed commit cc8ff4f

File tree

4 files changed

+31
-12
lines changed

4 files changed

+31
-12
lines changed

CHANGES.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,56 @@
11
# Changelog
22

3+
## 2.0.2
4+
5+
- Fixed bug in SQS sensor that sets "None" to aws key/secret vs allowing it to use the instance role.
6+
37
## 2.0.1
8+
49
- Deleted duplicate `headers` parameter in `actions/apigateway_test_invoke_authorizer.yaml` and
510
`actions/apigateway_test_invoke_method.yaml`
611

712
## 2.0.0
813

9-
* Drop Python 2.7 support
14+
- Drop Python 2.7 support
1015

1116
## 1.3.5
17+
1218
- Fix python3 problems when account_id or region empty
1319

1420
## 1.3.4
21+
1522
- Change `queue` parameter type in sensor payload from `urllib.parse.ParseResult` to `str`.
1623

1724
## 1.3.3
25+
1826
- Fix aliases 'ec2_start_instance' and 'ec2_stop_instance'
1927

2028
## 1.3.2
29+
2130
- Solved the bug regarding `aws_session_token` parameter for `boto3` cross account authentication in `actions.py`.
2231

2332
## 1.3.1
33+
2434
- Actions support multiaccount integration.
2535

2636
## 1.3.0
37+
2738
- `sqs_sensor` supports multiaccount integration.
2839

2940
## 1.2.3
41+
3042
- Support Python 3 everywhere
3143

3244
## 1.2.2
45+
3346
- Fix `sqs_sensor` to parse payload as dictionary (so that it actually works)
3447

3548
## 1.2.1
49+
3650
- Update `kwargs['user_data`] to `kwargs['UserData']` per the aws.ec2_run_instances action.
3751

3852
## 1.2.0
53+
3954
- Update `st2_user_data` to take raw data as input as an alternative to file path.
4055

4156
## 1.1.1
@@ -76,16 +91,17 @@
7691
- Updated action `runner_type` from `run-python` to `python-script`
7792

7893
## v0.9.3
79-
* Adding aliases for ec2 actions (list/start/stop) machines
94+
95+
- Adding aliases for ec2 actions (list/start/stop) machines
8096

8197
## v0.9.2
8298

83-
* Fix all the boto3 actions (autoscaling, etc.) so they work. Previously they didn't work because
99+
- Fix all the boto3 actions (autoscaling, etc.) so they work. Previously they didn't work because
84100
credentials weren't correctly passed in. #26
85101

86102
## v0.9.1
87103

88-
* Corrected incomplete error handling and validation of configuration (#22).
104+
- Corrected incomplete error handling and validation of configuration (#22).
89105

90106
## v0.6.0
91107

@@ -97,20 +113,20 @@ If you previously accessed the result of the ec2_run_instances action in the act
97113

98114
## v0.3.0
99115

100-
* Added CloudFormation, VPC, IAM, RDS, SQS, S3
116+
- Added CloudFormation, VPC, IAM, RDS, SQS, S3
101117

102118
## v0.2.0
103119

104-
* Added Route53
120+
- Added Route53
105121

106122
## v0.1.0
107123

108-
* Initial release
124+
- Initial release
109125

110-
## v0.3.0
126+
## v0.3.1
111127

112-
* Add aws.sqs_sensor which can monitor given sqs queue and trigger aws.sqs_new_message
128+
- Add aws.sqs_sensor which can monitor given sqs queue and trigger aws.sqs_new_message
113129

114130
## v0.4.0
115131

116-
* Add support for handling multiple input_queues to aws.sqs_sensor
132+
- Add support for handling multiple input_queues to aws.sqs_sensor

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ region:
280280
sqs_sensor:
281281
input_queues:
282282
- first_queue
283-
- second_queue
283+
- second_queue (queue list can be url or queue name)
284284
sqs_other:
285285
max_number_of_messages: 1
286286
```

pack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ keywords:
1919
- SQS
2020
- lambda
2121
- kinesis
22-
version: 2.0.1
22+
version: 2.0.2
2323
author : StackStorm, Inc.
2424
2525
python_versions:

sensors/sqs_sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ def _get_config_entry(self, key, prefix=None):
118118
if not value and config.get('setup', None):
119119
value = config['setup'].get(key, None)
120120

121+
if value == "None":
122+
value = None
123+
121124
return value
122125

123126
def _may_setup_sqs(self):

0 commit comments

Comments
 (0)