-
Notifications
You must be signed in to change notification settings - Fork 40k
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
AWS kube-down: don't fail if ELB not in VPC - #23784 #23785
AWS kube-down: don't fail if ELB not in VPC - #23784 #23785
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@@ -151,7 +151,7 @@ function get_igw_id { | |||
function get_elbs_in_vpc { | |||
# ELB doesn't seem to be on the same platform as the rest of AWS; doesn't support filtering | |||
aws elb --output json describe-load-balancers | \ | |||
python -c "import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if lb['VPCId'] == '$1']; print('\n'.join(lst))" | |||
python -c "import json,sys; lst = [str(lb['LoadBalancerName']) for lb in json.load(sys.stdin)['LoadBalancerDescriptions'] if 'VPCId' in lb and lb['VPCId'] == '$1']; print('\n'.join(lst))" |
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.
I think you could also do if lb.get('VPCId') ==
. Your way is more verbose but likely clearer though!
LGTM. Can you change the topic of the commit though - put a description like "AWS kube-up: don't fail if ELB not in VPC" (i.e. no issue # here). And then in the body include "Fixes #23784" on a line by itself, and then github will auto close the issue when this merges. One comment on the python, but on second thoughts I like your way better. Thanks for the fix! |
ok to test |
GCE e2e build/test passed for commit 06c04d1. |
Automatic merge from submit-queue |
Prevent python undefined key error.
Fixes #23784
This change is