-
Notifications
You must be signed in to change notification settings - Fork 182
ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK #5842
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
ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK #5842
Conversation
0178125
to
fc25083
Compare
Signed-off-by: “niladrix719” <[email protected]>
Signed-off-by: “niladrix719” <[email protected]>
1d3fe2f
to
d0ced61
Compare
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.
Thank you!
Almost LGTM
@@ -64,7 +64,7 @@ type ELB interface { | |||
GetListenerArns(ctx context.Context, targetGroup types.LoadBalancer) ([]string, error) | |||
// ModifyListeners modifies the actions of type ActionTypeEnumForward to perform routing traffic | |||
// to the given target groups. Other actions won't be modified. | |||
ModifyListeners(ctx context.Context, listenerArns []string, routingTrafficCfg RoutingTrafficConfig) error | |||
ModifyListeners(ctx context.Context, listenerArns []string, routingTrafficCfg RoutingTrafficConfig) ([]string, error) |
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.
Please add the name of []string to clarify
in.LogPersister.Errorf("Failed to routing traffic to PRIMARY/CANARY variants: %v", err) | ||
return false | ||
} | ||
|
||
if len(modifiedRules) > 0 { | ||
in.LogPersister.Infof("Successfully modified ELB listener rules: %s", strings.Join(modifiedRules, ", ")) |
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.
[nit] readable when n of rules >1 (ecs.go too)
in.LogPersister.Infof("Successfully modified ELB listener rules: %s", strings.Join(modifiedRules, ", ")) | |
in.LogPersister.Infof("Successfully modified %d ELB listener rules: %s", len(modifiedRules), strings.Join(modifiedRules, ", ")) |
} | ||
modifiedRuleArns = append(modifiedRuleArns, *rule.RuleArn) |
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.
In error handlings, return the current modifiedRuleArns
and show UI log in order to tell which rules are modified
Signed-off-by: Niladri Adhikary <[email protected]>
Signed-off-by: “niladrix719” <[email protected]>
Let me know if there’s anything else that needs updating |
Signed-off-by: “niladrix719” <[email protected]>
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.
The implementation is LGTM.
I want to add a note comment for the behavior.
ModifyListeners(ctx context.Context, listenerArns []string, routingTrafficCfg RoutingTrafficConfig) error | ||
ModifyListeners(ctx context.Context, listenerArns []string, routingTrafficCfg RoutingTrafficConfig) (modifiedRuleArns []string, err error) |
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.
Please add comments for methods to note that it returns a non-nil modifiedRuleArns value even when returning a non-nil error because it differs from the usual behavior of the go codes.
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.
Added a note
Signed-off-by: “niladrix719” <[email protected]>
Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]>
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 👍🏻
Thank you!
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.
Great, thank you!!!
…ipe-cd#5842) * ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK Signed-off-by: “niladrix719” <[email protected]> * resolved conflicts Signed-off-by: “niladrix719” <[email protected]> * applied requested changes Signed-off-by: “niladrix719” <[email protected]> * fix: lint Signed-off-by: “niladrix719” <[email protected]> * added note for ModifyListeners method Signed-off-by: “niladrix719” <[email protected]> * Update pkg/app/piped/platformprovider/ecs/client.go Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> --------- Signed-off-by: “niladrix719” <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Tushar240503 <[email protected]>
…ipe-cd#5842) * ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK Signed-off-by: “niladrix719” <[email protected]> * resolved conflicts Signed-off-by: “niladrix719” <[email protected]> * applied requested changes Signed-off-by: “niladrix719” <[email protected]> * fix: lint Signed-off-by: “niladrix719” <[email protected]> * added note for ModifyListeners method Signed-off-by: “niladrix719” <[email protected]> * Update pkg/app/piped/platformprovider/ecs/client.go Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> --------- Signed-off-by: “niladrix719” <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Tushar240503 <[email protected]>
…ipe-cd#5842) * ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK Signed-off-by: “niladrix719” <[email protected]> * resolved conflicts Signed-off-by: “niladrix719” <[email protected]> * applied requested changes Signed-off-by: “niladrix719” <[email protected]> * fix: lint Signed-off-by: “niladrix719” <[email protected]> * added note for ModifyListeners method Signed-off-by: “niladrix719” <[email protected]> * Update pkg/app/piped/platformprovider/ecs/client.go Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> --------- Signed-off-by: “niladrix719” <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Tushar240503 <[email protected]>
…ipe-cd#5842) * ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK Signed-off-by: “niladrix719” <[email protected]> * resolved conflicts Signed-off-by: “niladrix719” <[email protected]> * applied requested changes Signed-off-by: “niladrix719” <[email protected]> * fix: lint Signed-off-by: “niladrix719” <[email protected]> * added note for ModifyListeners method Signed-off-by: “niladrix719” <[email protected]> * Update pkg/app/piped/platformprovider/ecs/client.go Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> --------- Signed-off-by: “niladrix719” <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]>
…ipe-cd#5842) * ECS: Add UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK Signed-off-by: “niladrix719” <[email protected]> * resolved conflicts Signed-off-by: “niladrix719” <[email protected]> * applied requested changes Signed-off-by: “niladrix719” <[email protected]> * fix: lint Signed-off-by: “niladrix719” <[email protected]> * added note for ModifyListeners method Signed-off-by: “niladrix719” <[email protected]> * Update pkg/app/piped/platformprovider/ecs/client.go Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> --------- Signed-off-by: “niladrix719” <[email protected]> Signed-off-by: Niladri Adhikary <[email protected]> Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]> Signed-off-by: Arya Soni <[email protected]>
What this PR does:
Adds UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK
Why we need it:
Users will now see additional logs or UI messages specifying which listener rules were controlled during deployment transitions
Which issue(s) this PR fixes:
Fixes #5835
Does this PR introduce a user-facing change?: No