Skip to content

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

Merged
merged 8 commits into from
May 20, 2025

Conversation

niladrix719
Copy link
Contributor

@niladrix719 niladrix719 commented May 16, 2025

What this PR does:

Adds UI Logs for Listener Rules in TRAFFIC_ROUTING and ROLLBACK

Untitled design

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

  • How are users affected by this change: No
  • Is this breaking change: No
  • How to migrate (if breaking change): No

@niladrix719 niladrix719 force-pushed the ecs-log-listener-rules#5835 branch from 1d3fe2f to d0ced61 Compare May 16, 2025 17:48
Copy link
Member

@t-kikuc t-kikuc left a 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)
Copy link
Member

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, ", "))
Copy link
Member

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)

Suggested change
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)
Copy link
Member

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

niladrix719 and others added 2 commits May 16, 2025 23:34
@niladrix719
Copy link
Contributor Author

Let me know if there’s anything else that needs updating

@niladrix719 niladrix719 requested a review from t-kikuc May 16, 2025 19:40
Signed-off-by: “niladrix719” <[email protected]>
Copy link
Member

@Warashi Warashi left a 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)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note

Co-authored-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Niladri Adhikary <[email protected]>
Copy link
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻
Thank you!

Copy link
Member

@t-kikuc t-kikuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!!!

@t-kikuc t-kikuc merged commit d137010 into pipe-cd:master May 20, 2025
17 checks passed
Tushar240503 pushed a commit to Tushar240503/pipecd that referenced this pull request May 20, 2025
…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]>
Tushar240503 pushed a commit to Tushar240503/pipecd that referenced this pull request May 20, 2025
…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]>
Tushar240503 pushed a commit to Tushar240503/pipecd that referenced this pull request May 20, 2025
…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]>
Tushar240503 pushed a commit to Tushar240503/pipecd that referenced this pull request May 20, 2025
…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]>
aryasoni98 pushed a commit to aryasoni98/pipecd that referenced this pull request May 24, 2025
…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]>
@github-actions github-actions bot mentioned this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ECS: Add log on UI about which listener rules were controlled in TRAFFIC_ROUTING stage and ROLLBACK stage
3 participants