Skip to content

bugfix: remove stale listener condition#929

Merged
arkodg merged 4 commits intoenvoyproxy:mainfrom
datawire:hqudsi/stale-listener-condition
Jan 18, 2023
Merged

bugfix: remove stale listener condition#929
arkodg merged 4 commits intoenvoyproxy:mainfrom
datawire:hqudsi/stale-listener-condition

Conversation

@haq204
Copy link
Copy Markdown
Contributor

@haq204 haq204 commented Jan 17, 2023

Previously the listener status in the Gateway resource could be left stale if one of the listeners is removed.

We add new method to GatewayContext to reset the listener status and listener contexts and is called before re-computing

Testing:

  • Add unit test for new method
  • Add a couple of new testcases to the Translation unit tests to check for stale listener conditions and to ensure the status didn't change if the condition did not change.

Fixes #773

Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io>
@haq204 haq204 requested a review from a team as a code owner January 17, 2023 17:52
Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 17, 2023

Codecov Report

Merging #929 (5c80804) into main (c007313) will increase coverage by 0.30%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #929      +/-   ##
==========================================
+ Coverage   63.41%   63.72%   +0.30%     
==========================================
  Files          53       54       +1     
  Lines        7487     7589     +102     
==========================================
+ Hits         4748     4836      +88     
- Misses       2441     2451      +10     
- Partials      298      302       +4     
Impacted Files Coverage Δ
internal/gatewayapi/contexts.go 79.47% <100.00%> (+1.99%) ⬆️
internal/gatewayapi/translator.go 96.82% <100.00%> (-0.24%) ⬇️
internal/ir/infra.go 63.82% <0.00%> (-3.59%) ⬇️
internal/gatewayapi/resource.go 54.83% <0.00%> (-1.83%) ⬇️
internal/infrastructure/kubernetes/deployment.go 86.72% <0.00%> (-1.08%) ⬇️
internal/gatewayapi/route.go 89.02% <0.00%> (ø)
internal/status/conditions.go 96.15% <0.00%> (ø)
internal/gatewayapi/filters.go 82.01% <0.00%> (ø)
internal/gatewayapi/listener.go 100.00% <0.00%> (ø)
internal/gatewayapi/zz_generated.deepcopy.go 0.00% <0.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Hamzah Qudsi added 2 commits January 17, 2023 16:19
Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io>
Signed-off-by: Hamzah Qudsi <hqudsi@datawire.io>
Copy link
Copy Markdown
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested a review from skriss January 17, 2023 21:25
Copy link
Copy Markdown
Member

@Alice-Lilith Alice-Lilith left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@arkodg arkodg merged commit 12eb305 into envoyproxy:main Jan 18, 2023
@haq204 haq204 deleted the hqudsi/stale-listener-condition branch January 18, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale listener condition present in Gateway for a non-existing Listener

4 participants