-
Notifications
You must be signed in to change notification settings - Fork 20
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
Updates in deployfish.yml not respected for certain properties #29
Comments
On second thought - I guess the pattern does make sense in some cases, for example:
So, an updated solution to this issue is maybe to use the configuration already present in the service if it doesn't exist in if self.__aws_service and self.__aws_service['vpc_configuration'] and not self.__vpc_configuration:
self.__vpc_configuration = self.__aws_service['networkConfiguration']['awsvpcConfiguration'] |
We use mostly immutable ECS service parameters because most parameters for a service (service_name, service_role_arn, cluster_name, load_balancer, etc.) can't be changed without deleting and recreating the service. The one we did care about, But you are right, we need to be able to do that for If you want to try a pull request for this, I'll be happy to review it. Otherwise I can schedule this for sometime in the next few weeks. |
refs caltechads#29 - use vpc_configuration from yml unless it's not defined in the yml, in which case use the service config if there is one
Ran into this case when I was attempting to update the
vpc_configuration
property of a service in deployfish.yml.Specifically, I had changed the
security_group
list inside the service's vpc_configuration property, but upon running thedeploy
command, I noticed the updated security group list hadn't been applied. Looking through the codebase the reason the updated list wasn't applied seems to be this line: https://github.com/caltechads/deployfish/blob/master/deployfish/aws/ecs.py#L1112-L1113 - where the vpc_configuration block from thedeployfish.yml
is wiped out in favor of the configuration from the existing service.The easy fix would be to just remove the two lines mentioned above entirely, but looking through the rest of that file it appears that the pattern of overwriting the yml configuration with the values from the service is repeated for most of the
@property
declarations in the file. It seems to me that the values fromdeployfish.yml
should always take precedence - even if, say, the yml doesn't have a particular property and the existing service does, because in that case you could infer that the user wished to remove that particular property.So, I'm opening this issue to ask the question - is there a particular reason to use the existing service's values over the ones defined in
deployfish.yml
? Before I open a PR I want to make sure that I'm not missing some perfectly valid reason for that override pattern to exist.The text was updated successfully, but these errors were encountered: