-
Notifications
You must be signed in to change notification settings - Fork 397
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
elb_application_lb: test a rule based on http-header #347
elb_application_lb: test a rule based on http-header #347
Conversation
On hold until #348 is merged. |
95f328c
to
d124b4c
Compare
This feature depends on boto3 1.16.57 which is not availbe in our CI env. ansible-collections/amazon.aws#188 (comment) |
@goneri 1.16.57 is very new, it's only been out for a few weeks. It's unlikely many of our users will have it yet in their environments. Rather than requiring this version of boto3 in the mod_util we should check in the affected module(s) for the boto3 version when the feature that needs this version is used, like we do here: Then the integration tests would setup a virtualenv with that version of boto3 when testing that feature: https://github.com/ansible-collections/community.aws/blob/main/tests/integration/targets/elb_application_lb/tasks/main.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some examples of adding the new version of boto to environments can be found in:
#390
Note: I would generally recommend putting the dependency on the version of botocore rather than boto3. (That's where the actual test is happening)
to find the exact version of botocore you can do the following:
git clone https://github.com/boto/botocore.git
cd botocore
git blame botocore/data/elbv2/2015-12-01/service-2.json
Search for the API parameter you're trying to set (in this case HttpHeaderConfig):
4667b46391 (aws-sdk-python-automation 2019-06-24 20:15:37 +0000 2657) "HttpHeaderConfig":{
4667b46391 (aws-sdk-python-automation 2019-06-24 20:15:37 +0000 2658) "shape":"HttpHeaderConditionConfig",
4667b46391 (aws-sdk-python-automation 2019-06-24 20:15:37 +0000 2659) "documentation":"<p>Information for an HTTP header condition. Specify only when <code>Field</code> is <code>http-header</code>.</p>"
4667b46391 (aws-sdk-python-automation 2019-06-24 20:15:37 +0000 2660) },
The commit hash at the start of the line then tells you when the option was added to botocore
git tag --contains 4667b46391
This will then spit out a list of all botocore versions with support for that feature
the earliest being 1.12.176 ( Tue Jun 25 19:29:47 2019 ) which is much more reasonable to expect people to have installed than one from 2 weeks ago.
Digging a little further it looks like you're passing the wrong parameters for HttpHeaderConfig. See also https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/elbv2.html#ElasticLoadBalancingv2.Client.create_rule
tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml
Outdated
Show resolved
Hide resolved
tests/integration/targets/elb_application_lb/tasks/test_multiple_actions.yml
Outdated
Show resolved
Hide resolved
This should initially fail and be fixed the day ansible-collections/amazon.aws#188 is merged. See: ansible-collections/amazon.aws#187 See: ansible-collections#117
12549ad
to
593de15
Compare
…ions#347) * elb_application_lb: test a rule based on http-header This should initially fail and be fixed the day ansible-collections/amazon.aws#188 is merged. See: ansible-collections/amazon.aws#187 See: ansible-collections#117 Co-authored-by: Mark Chappell <[email protected]>
…ions#347) * elb_application_lb: test a rule based on http-header This should initially fail and be fixed the day ansible-collections/amazon.aws#188 is merged. See: ansible-collections/amazon.aws#187 See: ansible-collections#117 Co-authored-by: Mark Chappell <[email protected]>
…ions#347) * elb_application_lb: test a rule based on http-header This should initially fail and be fixed the day ansible-collections/amazon.aws#188 is merged. See: ansible-collections/amazon.aws#187 See: ansible-collections#117 Co-authored-by: Mark Chappell <[email protected]>
…ions#347) * elb_application_lb: test a rule based on http-header This should initially fail and be fixed the day ansible-collections/amazon.aws#188 is merged. See: ansible-collections/amazon.aws#187 See: ansible-collections#117 Co-authored-by: Mark Chappell <[email protected]>
Remove shippable references from repo Reviewed-by: https://github.com/apps/ansible-zuul
This should initially fail and be fixed the day ansible-collections/amazon.aws#188
is merged.
See: ansible-collections/amazon.aws#187
See: #117