-
Notifications
You must be signed in to change notification settings - Fork 8
WIP update-safe service config for load balancing #83
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
Conversation
|
specs are failing |
lib/broadside/target.rb
Outdated
| end | ||
|
|
||
| def update_safe_service_config | ||
| attributes_disallowed_for_updates = %i( |
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.
constant? SERVICE_ATTRIBUTES_ONLY_SET_AT_INSTANTIATION?
(i don't love that name, feel free to rename, but i do think it should be a constant)
lib/broadside/target.rb
Outdated
| load_balancers | ||
| ) | ||
|
|
||
| service_config.delete_if do |k, _| |
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 know reject and delete_if are identical but we mostly use reject /shrug
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.
also more importantly, with activesupport i think you can just do service_config.except(attributes_disallowed_for_updates)
lib/broadside/target.rb
Outdated
| } | ||
| end | ||
|
|
||
| def update_safe_service_config |
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.
maybe this could just be called update_service_config or service_config_for_updates? "safe" doesn't have much explanatory context in this power.
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.
maybe updateable_service_config, even
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.
(and add a comment about why these fields are stripped out)
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 mean, this is where cute ruby gets close to english, but isn't english. the intent here is:
service config
vs.
update-safe service config
not "update service config, which is safe"
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.
going with service_config_for_update, though
|
i'm 👍 with these changes though the other PR i opened #84 addresses them in a slightly less draconian way (you don't need the kind of wonder if GLI has a way of having those two separate commands ( though at the same time, all that feels like a lot of overkill. |
|
in fact it was just 2 commits ago i removed thiswhoops after tim complained it wasn't working. 👻 on me |
apurvis
left a comment
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.
this is a good intermediary change no matter what we decide in the end, though i would like those variables/methods renamed slightly
|
Also worth giving a final shoutout to #76 which should eventually solve all ELB issues top to bottom. |
|
i'm on board with the change except for those style nitpicks. cc @matl33t what do you think about this |
| load_balancers | ||
| placement_constraints | ||
| placement_strategy | ||
| role |
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.
|
Will wait on Matt to merge. |
apurvis
left a comment
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.
lgtm; let's see what @matl33t says
|
🆒 after some 🕶️ |
apurvis
left a comment
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.
lgtm; i guess this is 3.0.5?
|
@apurvis just added more specs and bumped the version |
|
do you want me to merge & release or do you have those privileges? |
|
@apurvis just released |
This is definitely part of #37; create_service needs service config information that tells it about the intended load balancer, and the load balancer info requires an IAM role.
The issue is that while
create-serviceneeds it,update-servicenot only can't change it, but as a result, will error out if it's present. So we need one copy with, one copy without.This doesn't have specs [yet], and also is probably not a complete list [yet].